Пример #1
0
 /**
  * Take a db hash and convert it into an array of files
  *
  * @see getFiles
  */
 public static function getFilesByKey($key, $separator = ' ')
 {
     $base64 = false;
     // try get base64 from cache
     if (function_exists('apc_store') && ini_get('apc.enabled')) {
         $cache = new sfAPCCache();
         $base64 = $cache->get($key);
     }
     if (!$base64) {
         $cache = new sfFileCache(array('cache_dir' => sfCombineUtility::getCacheDir()));
         $base64 = $cache->get($key);
     }
     // check db
     if (!$base64 && class_exists('sfCombine')) {
         $combine = Doctrine::getTable('sfCombine')->find($key);
         $base64 = $combine ? $combine->getFiles() : false;
     }
     return self::getFilesByBase64($base64, $separator);
 }
Пример #2
0
 /**
  * will not unserialize result
  */
 public function _get($key, $default = null)
 {
     return parent::get($key, $default);
 }