本文整理汇总了PHP中Zend_Tool_Project_Context_Filesystem_File::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Tool_Project_Context_Filesystem_File::init方法的具体用法?PHP Zend_Tool_Project_Context_Filesystem_File::init怎么用?PHP Zend_Tool_Project_Context_Filesystem_File::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Tool_Project_Context_Filesystem_File
的用法示例。
在下文中一共展示了Zend_Tool_Project_Context_Filesystem_File::init方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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();
}
示例3: 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;
}
示例4: 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.');
}
}
示例5: 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();
}
示例6: 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();
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: 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);
}
}
示例11: init
/**
* init()
*
* @return Zend_Tool_Project_Context_Zf_ApplicationConfigFile
*/
public function init()
{
$this->_type = $this->_resource->getAttribute('type');
parent::init();
return $this;
}
示例12: init
/**
* init()
*
*/
public function init()
{
$this->_version = $this->_resource->getAttribute('version');
parent::init();
}
示例13: 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();
}
示例14: init
/**
* Initialize
*
* @return Zend_Tool_Project_Context_Zf_ControllerFile
*/
public function init()
{
parent::init();
$this->setFilesystemName($this->_resource->getAttribute('fileName') . '.php');
return $this;
}