Пример #1
0
 public static function getCacheMethods(LiveCart $application)
 {
     $ret = array();
     $tranlationHandler = $application->getLocale()->translationManager();
     foreach (new DirectoryIterator(dirname(__FILE__) . '/') as $method) {
         if (substr($method->getFileName(), 0, 1) != '.') {
             $class = substr($method->getFileName(), 0, -4);
             if ($class != __CLASS__ && file_exists($method->getPathname())) {
                 include_once $method->getPathname();
                 $tranlationHandler->setDefinition($class, call_user_func(array($class, 'getName')));
                 $ret[] = $class;
             }
         }
     }
     $ret = array_merge(array('FileCache'), array_diff($ret, array('FileCache')));
     return $ret;
 }