/**
  * ( excerpt from
  * http://docs.hhvm.com/manual/en/recursivedirectoryiterator.construct.php )
  *
  * Constructs a RecursiveDirectoryIterator() for the provided path.
  *
  * @path       mixed   The path of the directory to be iterated over.
  * @flags      mixed   Flags may be provided which will affect the behavior
  *                     of some methods. A list of the flags can found under
  *                     FilesystemIterator predefined constants. They can
  *                     also be set later with
  *                     FilesystemIterator::setFlags().
  *
  * @return     mixed   Returns the newly created
  *                     RecursiveDirectoryIterator.
  */
 public function __construct($path, $flags = null)
 {
     if ($flags === null) {
         $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO;
     }
     parent::__construct($path, $flags);
 }
 /**
  * Explorer files and folders
  * 
  * @param string $path  Dir path of folder
  * @param int $flags FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS
  */
 public function __construct($path, $flags = null)
 {
     if (!is_null($flags)) {
         parent::__construct($path, $flags);
     } else {
         parent::__construct($path);
     }
 }
 /**
  * Constructor
  *
  * @param \Symfony\Component\Filesystem\Filesystem $filesystem Filesystem service
  * @param \Mni\FrontYAML\Parser $parser Front YAML parser
  * @param string $root Root directory
  * @param string $path Path to recurse through
  */
 public function __construct(Filesystem $filesystem, Parser $parser, $root, $path)
 {
     parent::__construct("{$root}{$path}", self::CURRENT_AS_PATHNAME | self::SKIP_DOTS);
     $this->filesystem = $filesystem;
     $this->parser = $parser;
     $this->root = $root;
     $this->path = $path;
 }
 /**
  * Overwriting the constructor to use the new `setFlags()` method and set a new default flags value
  *
  * The new default flags are : WebFilesystemIterator::KEY_AS_PATHNAME | WebFilesystemIterator::CURRENT_AS_WEBFILEINFO | WebFilesystemIterator::SKIP_DOTTED
  *
  * @param string $path The path of the new filesystem object
  * @param int $flags The object options'flags value
  */
 public function __construct($path, $flags = 16432)
 {
     $this->original_path = $path;
     parent::__construct($path, $flags);
     $this->setFlags($flags);
     if ($this->valid() && $this->getFlags() & WebFilesystemIterator::SKIP_DOTTED) {
         $this->_skipDottedIfSo();
     }
 }
Beispiel #5
0
 /**
  * Constructor.
  * Please, see \FileSystemIterator::__construct() method.
  * We add the $splFileInfoClass parameter.
  *
  * @param   string  $path                Path.
  * @param   int     $flags               Flags.
  * @param   string  $splFileInfoClass    SplFileInfo classname.
  */
 public function __construct($path, $flags = null, $splFileInfoClass = null)
 {
     $this->_splFileInfoClass = $splFileInfoClass;
     if (null === $flags) {
         parent::__construct($path);
     } else {
         parent::__construct($path, $flags);
     }
     return;
 }
Beispiel #6
0
 /**
  * Default constructor.
  * Extends FilesystemIterator to iterate through the files and return an 
  * instance of migrationstep
  * @param type $path
  */
 public function __construct($path)
 {
     parent::__construct($path);
 }