當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SplFileInfo::__toString方法代碼示例

本文整理匯總了PHP中SplFileInfo::__toString方法的典型用法代碼示例。如果您正苦於以下問題:PHP SplFileInfo::__toString方法的具體用法?PHP SplFileInfo::__toString怎麽用?PHP SplFileInfo::__toString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SplFileInfo的用法示例。


在下文中一共展示了SplFileInfo::__toString方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: up

 public function up()
 {
     require $this->fileInfo->__toString();
     $migrationName = $this->getName();
     $this->container->create($migrationName)->up();
     $this->adapter->initialize();
     $this->adapter->up($this->getId(), file_get_contents($this->fileInfo));
 }
開發者ID:wandu,項目名稱:framework,代碼行數:8,代碼來源:MigrationContainer.php

示例2: validateSetting

 /**
  * Validate directory
  *
  * Checks to see if file is directory and if permissions match expected
  *
  * @param SplFileInfo $file     File to check
  * @param array       $badFiles current array of bad files to report
  *
  * @return array
  * @access public
  */
 public function validateSetting(SplFileInfo $file, array $badFiles)
 {
     if ($file->isDir()) {
         $path = substr_replace($file->__toString(), '', 0, strlen(Mage::getBaseDir()) + 1);
         if (Mage::helper('bronto_verify/permissionchecker')->accept($path)) {
             $octalPerms = substr(sprintf('%o', $file->getPerms()), -$this->_permLen);
             if ($octalPerms != $this->_permission) {
                 $badFiles[$path]['directory permission'] = $octalPerms;
             }
         }
     }
     return parent::validateSetting($file, $badFiles);
 }
開發者ID:bevello,項目名稱:bevello,代碼行數:24,代碼來源:Directory.php

示例3: validateSetting

 /**
  * Validate Group
  *
  * Checks to see if file group setting matches expected
  *
  * @param SplFileInfo $file     File to check
  * @param array       $badFiles current array of bad files to report
  *
  * @return array
  * @access public
  */
 public function validateSetting(SplFileInfo $file, array $badFiles)
 {
     if (!empty($this->_targetGroup)) {
         //  Account for name and/or gid
         if (filter_var($this->_targetGroup, FILTER_VALIDATE_INT)) {
             $actualGroup = $file->getGroup();
         } else {
             $group = posix_getgrgid($file->getGroup());
             $actualGroup = $group['name'];
         }
         if ($actualGroup != $this->_targetGroup) {
             $path = substr_replace($file->__toString(), '', 0, strlen(Mage::getBaseDir()) + 1);
             $badFiles[$path]['group'] = $actualGroup;
         }
     }
     return parent::validateSetting($file, $badFiles);
 }
開發者ID:xiaoguizhidao,項目名稱:blingjewelry-prod,代碼行數:28,代碼來源:Group.php

示例4: __toString

 /**
  * Get text string with the correct height="yyy" width="xxx" string that
  * can be used directly in an IMG tag
  *
  * @return string
  */
 public function __toString()
 {
     parent::__toString();
     return $this->toString;
 }
開發者ID:El-Loco-Pinguino,項目名稱:FaitesUnVoeu_WF3,代碼行數:11,代碼來源:ImageFile.php

示例5: saveClass

 /**
  *
  * @param string $code
  * @param \SplFileInfo $filename
  */
 protected function saveClass($code, \SplFileInfo $filename)
 {
     @mkdir($filename->getPath(), 0777, TRUE);
     return file_put_contents($filename->__toString(), $code);
 }
開發者ID:slavomirkuzma,項目名稱:itc-bundle,代碼行數:10,代碼來源:PHPUnitGenerator.php


注:本文中的SplFileInfo::__toString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。