If I want to create a php class, which I include using:
if (!class_exists("ListMenuX")) { include "assets/snippets/listmenux/listmenux.inc.php"; }
how can I then, within the included class, access my $etomite instance? Currently, when trying to call $etomite->getActiveChildren() from within a function in my class like so:
function getChildList($parentId)
{
$listArray = false;
if (!$parentId===false) { $listArray = $etomite->getActiveChildren($parentId); }
return $listArray;
}
I get the error:
Fatal error: Call to a member function on a non-object in /home/sallen/public_html/thevirtualhandshake/assets/snippets/listmenux/listmenux.inc.php on line 53
Any suggestions on the proper way to approach this in the framework?