当前位置: 首页>>代码示例>>PHP>>正文


PHP SplFileInfo::__construct方法代码示例

本文整理汇总了PHP中SplFileInfo::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SplFileInfo::__construct方法的具体用法?PHP SplFileInfo::__construct怎么用?PHP SplFileInfo::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SplFileInfo的用法示例。


在下文中一共展示了SplFileInfo::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: next

 function next()
 {
     $this->entry = $this->dirObject->read();
     if ($this->entry) {
         parent::__construct($this->entry);
     }
 }
开发者ID:dw4dev,项目名称:Phalanger,代码行数:7,代码来源:DirectoryIterator.php

示例2: __construct

 /**
  * Constructs a new file from the given path.
  *
  * @param string $path The path to the file
  *
  * @throws FileNotFoundException If the given path is not a file
  *
  * @api
  */
 public function __construct($path)
 {
     if (!is_file($path)) {
         throw new FileNotFoundException($path);
     }
     parent::__construct($path);
 }
开发者ID:robertowest,项目名称:CuteFlow-V4,代码行数:16,代码来源:File.php

示例3: __construct

 /**
  * Constructs a new file from the given path.
  *
  * @param string $path The path to the file
  */
 public function __construct($path)
 {
     if (!is_file($path)) {
         throw new \RuntimeException(sprintf('Runtime Error: File Not Found: "%s"', $path));
     }
     parent::__construct($path);
 }
开发者ID:phpalchemy,项目名称:phpalchemy,代码行数:12,代码来源:File.php

示例4: __construct

 /**
  * File constructor.
  *
  * @param string     $fileName
  * @param FileSystem $fileSystem
  * @param bool       $fileNameCpFs
  */
 public function __construct($fileName, FileSystem $fileSystem, $fileNameCpFs = false)
 {
     $this->fileSystem = $fileSystem;
     if (!$fileNameCpFs) {
     }
     parent::__construct($fileName);
 }
开发者ID:mepatek,项目名称:application,代码行数:14,代码来源:File.php

示例5: __construct

 /**
  * @param	string	$filename
  * @return	void
  */
 public function __construct($filename)
 {
     if (substr($filename, 0, 1) == '~') {
         $filename = getenv('HOME') . substr($filename, 1);
     }
     parent::__construct($filename);
 }
开发者ID:huxtable,项目名称:core,代码行数:11,代码来源:File.php

示例6: __construct

 /**
  * Constructs a new file from the given path.
  *
  * @param string  $path  The path to the file
  * @param boolean $check Whether to check the path or not
  *
  * @throws \OutOfRangeException If the given path is not a file
  */
 public function __construct($path, $check = true)
 {
     if ($check && !is_file($path)) {
         throw new \OutOfRangeException("path {$path} is not a file");
     }
     parent::__construct($path);
 }
开发者ID:gjerokrsteski,项目名称:pimf-framework,代码行数:15,代码来源:File.php

示例7: __construct

 /**
  * Constructor
  *
  * @param string $filePathname Absolute path to uploaded file on disk
  * @param string $newName      Desired file name (with extension) of uploaded file
  */
 public function __construct($filePathname, $newName = null)
 {
     $desiredName = is_null($newName) ? $filePathname : $newName;
     $this->name = pathinfo($desiredName, PATHINFO_FILENAME);
     $this->extension = strtolower(pathinfo($desiredName, PATHINFO_EXTENSION));
     parent::__construct($filePathname);
 }
开发者ID:prabhatse,项目名称:olx_hack,代码行数:13,代码来源:FileInfo.php

示例8: __construct

 public function __construct($fileName, $delimiter = self::DEFAULT_DELIMITER, $enclosure = self::DEFAULT_ENCLOSURE, $escapedBy = "")
 {
     parent::__construct($fileName);
     $this->_escapedBy = $escapedBy;
     $this->_setDelimiter($delimiter);
     $this->_setEnclosure($enclosure);
 }
开发者ID:schpill,项目名称:thin,代码行数:7,代码来源:Csv.php

示例9: __construct

 /**
  * Constructs a new file from the given path.
  * @param $path The path to the file
  * @param bool $checkPath Whether to check the path or not
  * @throws FileNotFoundException If the given path is not a file
  */
 public function __construct($path, $checkPath = true)
 {
     if ($checkPath && !is_file($path)) {
         throw new FileNotFoundException($path);
     }
     parent::__construct($path);
 }
开发者ID:manyoubaby123,项目名称:imshop,代码行数:13,代码来源:File.php

示例10: __construct

 /**
  * Constructor
  *
  * @param string $filename
  * @param string $openMode
  */
 public function __construct($filename, $openMode = 'r')
 {
     $this->_file = @fopen($filename, $openMode);
     if (!$this->_file) {
         throw new \RuntimeException("Error opening file '{$filename}', mode '{$openMode}'");
     }
     parent::__construct($filename);
 }
开发者ID:hschletz,项目名称:braintacle,代码行数:14,代码来源:FileObject.php

示例11: __construct

 /**
  * Create new uploaded file
  *
  * @param  string $path         Local filesystem path to uploaded file
  * @param  string $originalName The original file name provided by the HTTP client
  *
  * @throws \InvalidArgumentException If file path is not a valid uploaded file
  */
 public function __construct($path, $originalName = null)
 {
     if (!$this->isUploadedFile($path)) {
         throw new \InvalidArgumentException('File path is not a valid uploaded file');
     }
     $this->originalName = $originalName;
     parent::__construct($path);
 }
开发者ID:edblighter,项目名称:uploads,代码行数:16,代码来源:UploadedFile.php

示例12: __construct

 public function __construct($file_name)
 {
     $this->fs = DefaultFileSystem::getFileSystem();
     $path = $this->fs->fromURIPath(new String($file_name));
     $this->path = $this->fs->normalize($path);
     $this->prefixLength = $this->fs->prefixLength($this->path);
     parent::__construct($this->path);
 }
开发者ID:phpj,项目名称:phpj,代码行数:8,代码来源:File.php

示例13: __construct

 public function __construct(array $uploadedFile)
 {
     parent::__construct($uploadedFile['tmp_name']);
     $this->setFilename($uploadedFile['name']);
     $this->setMimeType();
     $this->setMd5();
     $this->setExtension();
 }
开发者ID:alex-moreno-costa,项目名称:upload,代码行数:8,代码来源:UploadedFile.php

示例14: __construct

 /**
  * @param string $prefix prefix to uniqid()
  * @throws \pharext\Exception
  */
 public function __construct($prefix)
 {
     $temp = new Tempname($prefix);
     if (!is_dir($temp) && !mkdir($temp, 0700, true)) {
         throw new Exception("Could not create tempdir: " . error_get_last()["message"]);
     }
     parent::__construct($temp);
 }
开发者ID:m6w6,项目名称:pharext,代码行数:12,代码来源:Tempdir.php

示例15: __construct

 public function __construct($name, $isDir, $isWritable)
 {
     parent::__construct($name);
     $this->fname = $name;
     $this->pathInfo = pathinfo($this->fname);
     $this->isDir = $isDir;
     $this->isWritable = $isWritable;
 }
开发者ID:gitter-badger,项目名称:diamantedesk-application,代码行数:8,代码来源:FileInfoStub.php


注:本文中的SplFileInfo::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。