/** * Returns a list with active extensions * * @param bool $onlyActive Set to false to retrieve ALL the extensions * @return array */ public static function all() { if (empty(self::$_all)) { self::$_all = Cache::read('extensions', 'sl'); } if (empty(self::$_all)) { App::import('folder'); $folder = new Folder(APP . 'extensions'); $contents = $folder->read(); self::$_all = $contents[0]; Cache::write('extensions', self::$_all, 'sl'); } return self::$_all; }