Ejemplo n.º 1
0
 /**
  * Sets the current->path. A relative or absolute path
  * may be used.
  *
  * @static
  * @access public
  * @param string $path the value current->path should be set to
  * @return string the old value of current->path
  */
 public static function set($path)
 {
     if (isset($path)) {
         if (is_string($path) || $path instanceof StupidPath) {
             $path = new self($path);
         } elseif (!$path instanceof CurrentPath) {
             throw new InvalidArgumentException('Invalid path');
         }
     }
     $oldPath = self::$current;
     self::$current = $path;
     return $oldPath;
 }