本文整理汇总了PHP中Symfony\Component\Finder\SplFileInfo::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SplFileInfo::__construct方法的具体用法?PHP SplFileInfo::__construct怎么用?PHP SplFileInfo::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Finder\SplFileInfo
的用法示例。
在下文中一共展示了SplFileInfo::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param string $file
* @param string|null $relativePath
* @param string|null $relativePathname
* @param bool $resolvePath
*/
public function __construct($file, $relativePath = null, $relativePathname = null, $resolvePath = true)
{
if (true === $resolvePath && false !== ($realFile = realpath($file))) {
$file = $realFile;
}
if ($relativePath === null || $relativePathname === null) {
$relativePathname = static::absoluteToRelativePath($file);
$relativePath = dirname($relativePathname);
}
parent::__construct($file, $relativePath, $relativePathname);
}
示例2: __construct
public function __construct($file, $repository, $mimeType = null)
{
parent::__construct($file, $file->getRelativePath(), $file->getRelativePathname());
$this->mimeType = $mimeType;
$this->repository = $repository;
}
示例3: __construct
/**
* Constructor
*
* @param string $file The file name
* @param string $relativePath The relative path
* @param string $relativePathname The relative path name
* @param array $info
*/
public function __construct($file, $relativePath, $relativePathname, $info)
{
parent::__construct($file, $relativePath, $relativePathname);
$this->info = $info;
}
示例4: __construct
/**
* Constructor
*
* @param \Mni\FrontYAML\Parser $parser Front YAML parser
* @param string $pathname
* @param string $relPathname
*/
public function __construct(Parser $parser, $pathname, $relPathname)
{
parent::__construct($pathname, dirname($relPathname), $relPathname);
$this->parser = $parser;
}
示例5: __construct
public function __construct(SplFileInfo $file, $repository)
{
parent::__construct($file, $file->getRelativePath(), $file->getRelativePathname());
$this->repository = $repository;
}