Hello! So I currently have a class titled Appliciation which contains a method called start.
<?php
class Application {
/*
* Application class
*/
public function __construct($IceTray){
$this->IceTray = $IceTray;
}
/* Starts application */
public function start(){
/* Confiures error reporting */
$this->IceTray->Error->configure();
$Path = $IceTray->Path;
include APPDIR.'/paths.php';
$Path->start();
}
}
I'm including this file that will only use the Path object. When the script is run I get this error:
Fatal error: Call to a member function set() on a non-object in C:\wamp\www\IceTray\application\paths.php on line 16
So obviously the Path variable/object isn't in the scope of the included file for some reason, is this different because it's inside a method? This worked fine procedurally. Thanks for any suggestions.
Also I did consider maybe using eval, but that could have issues... Again thanks for any suggestions!