public static function initServices() { //load resources to the smarty's context from autoload dir $audir = PathManager::ozonePhpServiceAutoloadDir(); $serviceFiles = ls($audir, "*.php"); foreach ($serviceFiles as $sf) { require_once $audir . $sf; $class = str_replace('.php', '', $sf); $service = new $class(self::$runData); self::$smarty->assign($service->serviceName(), $service); } // load services from application path $audir = PathManager::ozoneApplicationPhpServiceAutoloadDir(); $serviceFiles = ls($audir, "*.php"); foreach ($serviceFiles as $sf) { require_once $audir . $sf; $class = str_replace('.php', '', $sf); $service = new $class(self::$runData); self::$smarty->assign($service->serviceName(), $service); } }