本文整理汇总了PHP中RecursiveDirectoryIterator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP RecursiveDirectoryIterator::__construct方法的具体用法?PHP RecursiveDirectoryIterator::__construct怎么用?PHP RecursiveDirectoryIterator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecursiveDirectoryIterator
的用法示例。
在下文中一共展示了RecursiveDirectoryIterator::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* {@inheritdoc}
*/
public function __construct($path, $flags = 0)
{
parent::__construct($path, $flags);
// Normalize slashes on Windows
$this->normalizeKey = '\\' === DIRECTORY_SEPARATOR && !($flags & self::KEY_AS_FILENAME);
$this->normalizeCurrent = '\\' === DIRECTORY_SEPARATOR && $flags & self::CURRENT_AS_PATHNAME;
}
示例2: __construct
public function __construct($path, $flags)
{
if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
throw new RuntimeException('This iterator only support returning current as fileinfo.');
}
parent::__construct($path, $flags);
}
示例3: __construct
public function __construct($path, PluginManager $pluginManager, $projectRootPath, $flags = null)
{
if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
throw new \RuntimeException('This iterator only support returning current as SplFileInfo.');
}
parent::__construct($path, $flags);
$this->setPluginManager($pluginManager)->setProjectRootPath($projectRootPath);
}
示例4: __construct
public function __construct($path, $ignoreUnreadableDirs = false)
{
if (!$ignoreUnreadableDirs && (!is_dir($path) || !is_readable($path))) {
throw new ehough_finder_exception_AccessDeniedException("Could not open directory at {$path}");
}
$this->_ignoreUnreadableDirs = $ignoreUnreadableDirs;
parent::__construct($path);
}
示例5: __construct
/**
* Constructor.
*
* @param string $path
* @param int $flags
* @param bool $ignoreUnreadableDirs
*
* @throws \RuntimeException
*/
public function __construct($path, $flags, $ignoreUnreadableDirs = false)
{
if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
throw new \RuntimeException('This iterator only support returning current as fileinfo.');
}
parent::__construct($path, $flags);
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
}
示例6: __construct
/**
* Constructor.
*
* @param string $path
* @param int $flags
* @param bool $ignoreUnreadableDirs
*
* @throws \RuntimeException
*/
public function __construct($path, $flags, $ignoreUnreadableDirs = false)
{
if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
throw new \RuntimeException('This iterator only support returning current as fileinfo.');
}
parent::__construct($path, $flags);
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
$this->rootPath = (string) $path;
if ('/' !== DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
$this->directorySeparator = DIRECTORY_SEPARATOR;
}
}
示例7: __construct
public function __construct($path, $flags = null, $recursive = false)
{
if (is_bool($flags)) {
$recursive = $flags;
$flags = null;
}
if ($flags === null) {
$flags = \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO;
}
$this->recursive = $recursive;
parent::__construct($path, $flags);
}
示例8: __construct
/**
* Constructor.
* Please, see \RecursiveDirectoryIterator::__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)
{
if (null === $flags) {
parent::__construct($path);
} else {
parent::__construct($path, $flags);
}
if (null !== self::$_handlePath) {
$this->_relativePath = self::$_handlePath;
self::$_handlePath = null;
} else {
$this->_relativePath = $path;
}
$this->setSplFileInfoClass($splFileInfoClass);
return;
}
示例9: __construct
public function __construct($path, $flags = \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)
{
parent::__construct($path, $flags);
}
示例10: __construct
public function __construct($path, $sourceBasePath, $destBasePath)
{
$this->sourceBasePath = $sourceBasePath;
$this->destBasePath = $destBasePath;
parent::__construct($path);
}
示例11: __construct
public function __construct($path)
{
parent::__construct($path);
// Skip current and parent directory
$this->skipdots();
}
示例12: __construct
/**
* Constructor
*
* @param sfFilebasePluginFile $path
* @param integer $flags
*/
public function __construct(sfFilebasePluginFile $path, $flags = parent::CURRENT_AS_FILEINFO)
{
//parent::setInfoClass('sfFilebasePluginFile');
parent::__construct($path, $flags);
$this->filebase = $path->getFilebase();
}
开发者ID:joshiausdemwald,项目名称:sfFilebasePlugin,代码行数:12,代码来源:sfFilebasePluginRecursiveDirectoryIterator.php
示例13:
function __construct($path)
{
parent::__construct($path);
}
示例14:
function __construct($a)
{
echo __FUNCTION__ . "\n";
return parent::__construct($a);
}
示例15:
function __construct($path, $skipUnreadable)
{
parent::__construct($path, \RecursiveDirectoryIterator::SKIP_DOTS);
$this->skipUnreadable = $skipUnreadable;
}