PC Nerd Posted March 5, 2009 Share Posted March 5, 2009 Hi, I'm writing a sort of plugin system, and my Page ( as in the page specific class that handles that pages content) is telling me that it cannot find the interface which i included on the first line of index.php... any suggestions? Thanks in advace - heres my code. PC_Nerd Error Interface 'Page' not found in ******/cp/pages/Home.class.php on line 2 index.php: <?php include_once "classes/Page.ifc.php"; // Extension page interface include_once "classes/Factory.class.php"; // Component Factory include_once "classes/Filesystem.class.php"; //Filesystem management $f= new Factory(); ..... Other code that parses $_GET and $_POST... no implementation/use of any included files classes or anything etc. $loaded = $f->loadClass("Home"); if($loaded==False) { die("Could not load Home"); } $HomePage = new Home(); echo $HomePage->getPage(); ?> I wont post all my classes - they sort of "embed" each other inside the factory class - but essentially it searches subdireectoriese for teh named class - and then require_once's it. Home.class.php <?php class Home implements Page { private $title = "Test page"; private $content = "This is some test content. Later it will be returned through the getPage() method"; ......... *other methods based in the Page interface } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.