コード例 #1
0
ファイル: Directory.php プロジェクト: perryflynn/PerrysLambda
 /**
  * Constructor
  * @param \PerrysLambda\IO\DirectoryConverter $dirconv
  */
 public function __construct(DirectoryConverter $dirconv)
 {
     $dirconv->setItemtype($this->getFileClassType());
     parent::__construct($dirconv);
 }
コード例 #2
0
ファイル: File.php プロジェクト: perryflynn/PerrysLambda
 /**
  * Open new Directory instance
  * @return \PerrysLambda\IO\Directory
  */
 public function openDir()
 {
     if (!$this->isDir()) {
         throw new IOException("Not a directory");
     }
     $dirconv = DirectoryConverter::fromPath($this);
     $dirconv->setRoot($this->getRootDirectory());
     $type = $this->getDirectoryType();
     return new $type($dirconv);
 }