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


PHP Zend_Tool_Project_Context_Filesystem_File類代碼示例

本文整理匯總了PHP中Zend_Tool_Project_Context_Filesystem_File的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Tool_Project_Context_Filesystem_File類的具體用法?PHP Zend_Tool_Project_Context_Filesystem_File怎麽用?PHP Zend_Tool_Project_Context_Filesystem_File使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: copyFileContent

 public static function copyFileContent(Zend_Tool_Project_Context_Filesystem_File $resource)
 {
     $path = realpath(__DIR__ . '/templates/project') . '/';
     if ($resource->getResource()->getAttribute('sourceName')) {
         $template = $resource->getResource()->getAttribute('sourceName');
     } else {
         $template = $resource->getResource()->getAttribute('filesystemName');
     }
     /** @noinspection PhpToStringImplementationInspection */
     if (Dfi_File::isReadable($path . $template)) {
         return file_get_contents($path . $template);
     } else {
         throw new ZFscaffold_ZfTool_Exception('template defined but not found: ' . $template, self::MSG_ERROR);
     }
 }
開發者ID:dafik,項目名稱:zf-scaffold,代碼行數:15,代碼來源:ScaffoldProvider.php

示例2: init

 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_TestLibraryFile
  */
 public function init()
 {
     $this->_forClassName = $this->_resource->getAttribute('forClassName');
     $this->_filesystemName = ucfirst(ltrim(strrchr($this->_forClassName, '_'), '_')) . 'Test.php';
     parent::init();
     return $this;
 }
開發者ID:georgepaul,項目名稱:socialstrap,代碼行數:12,代碼來源:TestLibraryFile.php

示例3: init

 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_TestApplicationControllerFile
  */
 public function init()
 {
     $this->_forControllerName = $this->_resource->getAttribute('forControllerName');
     $this->_filesystemName = ucfirst($this->_forControllerName) . 'ControllerTest.php';
     parent::init();
     return $this;
 }
開發者ID:travisj,項目名稱:zf,代碼行數:12,代碼來源:TestApplicationControllerFile.php

示例4: init

 /**
  * init()
  *
  */
 public function init()
 {
     $this->_formName = $this->_resource->getAttribute('formName');
     $this->_moduleName = $this->_resource->getAttribute('moduleName');
     $this->_filesystemName = ucfirst($this->_formName) . '.php';
     parent::init();
 }
開發者ID:omusico,項目名稱:logica,代碼行數:11,代碼來源:ZfsFormFile.php

示例5: init

 public function init()
 {
     parent::init();
     $this->_applicationConfigFile = $this->_resource->getProfile()->search('ApplicationConfigFile');
     $this->_applicationDirectory = $this->_resource->getProfile()->search('ApplicationDirectory');
     if ($this->_applicationConfigFile === false || $this->_applicationDirectory === false) {
         throw new Exception('To use the BootstrapFile context, your project requires the use of both the "ApplicationConfigFile" and "ApplicationDirectory" contexts.');
     }
 }
開發者ID:cljk,項目名稱:kimai,代碼行數:9,代碼來源:BootstrapFile.php

示例6: init

 /**
  * init() is called after resources have been assembled, this effectively
  * gives a "resource" within a project a "context" to operate under.
  */
 public function init()
 {
     $this->_modelName = $this->_resource->getAttribute('modelName');
     $this->_moduleName = $this->_resource->getAttribute('moduleName');
     $this->_adapter = $this->_resource->getAttribute('adapter');
     $this->_tableName = $this->_resource->getAttribute('tableName');
     $this->_filesystemName = ucfirst($this->_modelName) . '.php';
     parent::init();
 }
開發者ID:rtsantos,項目名稱:mais,代碼行數:13,代碼來源:DbTableModelFile.php

示例7: init

 public function init()
 {
     if (null === $this->_migrationName) {
         list($sec, $msec) = explode(".", microtime(true));
         $this->_migrationName = date('Ymd_His_') . sprintf("%02d", $msec);
     }
     $this->_filesystemName = $this->_migrationName . '.php';
     parent::init();
 }
開發者ID:uglide,項目名稱:zfcore-transition,代碼行數:9,代碼來源:MigrationFile.php

示例8: init

 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_ViewScriptFile
  */
 public function init()
 {
     if ($layoutName = $this->_resource->getAttribute('layoutName')) {
         $this->_layoutName = $layoutName;
     } else {
         throw new Exception('Either a forActionName or scriptName is required.');
     }
     parent::init();
     return $this;
 }
開發者ID:cljk,項目名稱:kimai,代碼行數:15,代碼來源:LayoutScriptFile.php

示例9: init

 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_ProjectProviderFile
  */
 public function init()
 {
     $this->_projectProviderName = $this->_resource->getAttribute('projectProviderName');
     $this->_actionNames = $this->_resource->getAttribute('actionNames');
     $this->_filesystemName = ucfirst($this->_projectProviderName) . 'Provider.php';
     if (strpos($this->_actionNames, ',')) {
         $this->_actionNames = explode(',', $this->_actionNames);
     } else {
         $this->_actionNames = $this->_actionNames ? array($this->_actionNames) : array();
     }
     parent::init();
     return $this;
 }
開發者ID:bizanto,項目名稱:Hooked,代碼行數:18,代碼來源:ProjectProviderFile.php

示例10: init

 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_ViewScriptFile
  */
 public function init()
 {
     if ($forActionName = $this->_resource->getAttribute('forActionName')) {
         $this->_forActionName = $forActionName;
         $this->_filesystemName = $this->_convertActionNameToFilesystemName($forActionName) . '.phtml';
     } elseif ($scriptName = $this->_resource->getAttribute('scriptName')) {
         $this->_scriptName = $scriptName;
         $this->_filesystemName = $scriptName . '.phtml';
     } else {
         throw new Exception('Either a forActionName or scriptName is required.');
     }
     parent::init();
     return $this;
 }
開發者ID:sonicmaster,項目名稱:RPG,代碼行數:19,代碼來源:ViewScriptFile.php

示例11: init

 public function init()
 {
     parent::init();
     $applicationConfigFile = $this->_resource->getProfile()->search('ApplicationConfigFile');
     $applicationDirectory = $this->_resource->getProfile()->search('ApplicationDirectory');
     if ($applicationConfigFile === false || $applicationDirectory === false) {
         throw new Exception('To use the BootstrapFile context, your project requires the use of both the "ApplicationConfigFile" and "ApplicationDirectory" contexts.');
     }
     if ($applicationConfigFile->getContext()->exists()) {
         define('APPLICATION_PATH', $applicationDirectory->getPath());
         $applicationOptions = array();
         $applicationOptions['config'] = $applicationConfigFile->getPath();
         $this->_applicationInstance = new Zend_Application('development', $applicationOptions);
     }
 }
開發者ID:c12g,項目名稱:stratos-php,代碼行數:15,代碼來源:BootstrapFile.php

示例12: save

 /**
  * save()
  *
  * Proxy to create
  *
  * @return Zend_Tool_Project_Context_System_ProjectProfileFile
  */
 public function save()
 {
     parent::create();
     return $this;
 }
開發者ID:fredcido,項目名稱:cenbrap,代碼行數:12,代碼來源:ProjectProfileFile.php

示例13: init

 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_ApplicationConfigFile
  */
 public function init()
 {
     $this->_type = $this->_resource->getAttribute('type');
     parent::init();
     return $this;
 }
開發者ID:be-dmitry,項目名稱:zf1,代碼行數:11,代碼來源:ApplicationConfigFile.php

示例14: init

 /**
  * init()
  *
  */
 public function init()
 {
     $this->_version = $this->_resource->getAttribute('version');
     parent::init();
 }
開發者ID:CEMD-CN,項目名稱:MageTool,代碼行數:9,代碼來源:InstallFile.php

示例15: init

 /**
  * init()
  *
  */
 public function init()
 {
     $this->_className = $this->_resource->getAttribute('name') ? $this->_resource->getAttribute('name') : $this->_filesystemName;
     $this->_filesystemName = ucfirst($this->_className) . '.php';
     parent::init();
 }
開發者ID:CEMD-CN,項目名稱:MageTool,代碼行數:10,代碼來源:AbstractFile.php


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