本文整理匯總了PHP中Symfony\Component\Finder\Finder::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Finder::__construct方法的具體用法?PHP Finder::__construct怎麽用?PHP Finder::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Symfony\Component\Finder\Finder
的用法示例。
在下文中一共展示了Finder::__construct方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @access public
*/
public function __construct($path = null)
{
if ($path) {
$this->setPath($path);
parent::__construct($path);
}
}
示例2: __construct
/**
* @param ParserInterface $parser
* @param VerboseProgressOutput $progressOutput
*/
public function __construct(ParserInterface $parser, VerboseProgressOutput $progressOutput)
{
parent::__construct();
$this->parser = $parser;
$this->files()->name('*.php');
$this->progressOutput = $progressOutput;
}
示例3: __construct
public function __construct()
{
parent::__construct();
$files = $this->getFilesToExclude();
$this->files()->name('*.php')->name('*.twig')->name('*.xml')->name('*.yml')->ignoreDotFiles(true)->ignoreVCS(true)->exclude('vendor')->filter(function (\SplFileInfo $file) use($files) {
return !in_array($file->getRelativePathname(), $files, true);
});
}
示例4: __construct
public function __construct()
{
parent::__construct();
foreach ($this->getNames() as $name) {
$this->name($name);
}
$this->files()->ignoreDotFiles(true)->ignoreVCS(true);
}
示例5: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$finder = $this;
$finder->setReader(new AnnotationReader())->files()->name('*.php')->filter(function (\SplFileInfo $file) use($finder) {
try {
$fileInspector = new FileInspector($file->getPathname());
$classInspector = $fileInspector->getClassInspector($finder->getReader());
foreach ($finder->getContainsAtLeastOneOf() as $annotation) {
if ($classInspector->containsClassAnnotation($annotation) || $classInspector->containsMethodAnnotation($annotation) || $classInspector->containsPropertyAnnotation($annotation)) {
return true;
}
}
} catch (AnnotationScannerException $ex) {
return false;
}
return false;
});
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->files()->name('*.php');
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->files()->name('*.php')->name('*.twig')->ignoreDotFiles(true)->ignoreVCS(true)->exclude('vendor');
}
示例8: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->removeAdapters()->addAdapter(new MagentoPhpAdapter(), -50)->setAdapter('magento-php');
}
示例9: __construct
/**
* @param ConsoleOutput $console
*/
public function __construct(ConsoleOutput $console)
{
$this->console = $console;
parent::__construct();
}
示例10: __construct
public function __construct()
{
parent::__construct();
}