Ejemplo n.º 1
0
 static function create($options)
 {
     if (isset($options->cache)) {
         $cache = $options->cache . 'cache.tmp';
         if ($www = fs::read($cache)) {
             $www = unserialize($www);
             $www->bind();
             return $www;
         } else {
             $www = new www($options);
             fs::write($cache, serialize($www));
             $www->bind();
             return $www;
         }
     } else {
         $www = new www($options);
         $www->bind();
         return $www;
     }
 }