09-17-2007, 01:24 PM
|
#3 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
I see the problem here. As you are including the files in your class itself, you're correct in that it inherits it, but it retains its scope. Therefore, take header.php as our example, because it is being included in the getHeader() function it will be included correctly, but be classed as part of the class.
Thus, in header.php you can still call the functions in your Layout class, but instead of using the object itself that you created when initiating your class, in your example, $System->Layout, it would simply by $this.
Wrong:
PHP Code:
<?php echo $System->Config->showSiteName();?>
Right:
PHP Code:
<?php echo $this->showSiteName();?>
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|