Esempio n. 1
0
File: Set.php Progetto: eexit/smak
 /**
  * Class constructor
  * 
  * @param \SplFileInfo $set_info Set file info
  */
 public function __construct(\SplFileInfo $set_info)
 {
     parent::__construct();
     $this->set_path = $set_info->getRealPath();
     $this->name = $set_info->getFilename();
     $this->files()->in($set_info->getRealPath())->ignoreDotFiles(true);
     foreach ($this->allowed_ext as $ext) {
         $this->name(sprintf('/%s$/i', $ext));
     }
 }
Esempio n. 2
0
 /**
  * Class constructor
  * 
  * @param string $dir Collection parent directory
  * @param int $depth The Finder depth to parse
  */
 public function __construct($dir = __DIR__)
 {
     parent::__construct();
     $this->dir = $dir;
     $this->directories()->in($this->dir)->ignoreDotFiles(true);
 }