Hi,
I have a class called 'Record' and within which there is a property called '_database' which holds an instance of the class 'Database'.
Record is then extended by another class called 'UnitGroup', within 'UnitGroup' I want to be able to access {_database}->sql.
From 'Record' I can do this with the following:
$this->{_database}->sql("some sql here...");
but doing the same from 'UnitGroup' results in the error message:
Can't call method "sql" on an undefined value at...
er.... what am I doing wrong???
Thanks.
I have a class called 'Record' and within which there is a property called '_database' which holds an instance of the class 'Database'.
Record is then extended by another class called 'UnitGroup', within 'UnitGroup' I want to be able to access {_database}->sql.
From 'Record' I can do this with the following:
$this->{_database}->sql("some sql here...");
but doing the same from 'UnitGroup' results in the error message:
Can't call method "sql" on an undefined value at...
er.... what am I doing wrong???
Thanks.