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


PHP BakeTask::execute方法代码示例

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


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

示例1: execute

 /**
  * Execution method always used for tasks
  *
  * @return void
  */
 public function execute()
 {
     parent::execute();
     if (empty($this->args)) {
         $this->_interactive();
     }
     if (!empty($this->args[0])) {
         $this->interactive = false;
         if (!isset($this->connection)) {
             $this->connection = 'default';
         }
         if (strtolower($this->args[0]) == 'all') {
             return $this->all();
         }
         $model = $this->_modelName($this->args[0]);
         $this->listAll($this->connection);
         $useTable = $this->getTable($model);
         $object = $this->_getModelObject($model, $useTable);
         if ($this->bake($object, false)) {
             if ($this->_checkUnitTest()) {
                 $this->bakeFixture($model, $useTable);
                 $this->bakeTest($model);
             }
         }
     }
 }
开发者ID:juliushermosura,项目名称:globeloop,代码行数:31,代码来源:ModelTask.php

示例2: execute

 /**
  * Execution method always used for tasks
  *
  * @return void
  */
 public function execute()
 {
     parent::execute();
     if (empty($this->args)) {
         $this->_interactive();
     }
     if (count($this->args) == 1) {
         $this->_interactive($this->args[0]);
     }
     if (count($this->args) > 1) {
         $type = Inflector::classify($this->args[0]);
         if ($this->bake($type, $this->args[1])) {
             $this->out('<success>Done</success>');
         }
     }
 }
开发者ID:exntu,项目名称:cakephp,代码行数:21,代码来源:TestTask.php

示例3: execute

 /**
  * Execution method always used for tasks
  * Handles dispatching to interactive, named, or all processes.
  *
  * @return void
  */
 public function execute()
 {
     parent::execute();
     if (empty($this->args)) {
         $this->_interactive();
     }
     if (isset($this->args[0])) {
         $this->interactive = false;
         if (!isset($this->connection)) {
             $this->connection = 'default';
         }
         if (strtolower($this->args[0]) === 'all') {
             return $this->all();
         }
         $model = $this->_modelName($this->args[0]);
         $this->bake($model);
     }
 }
开发者ID:galabyca,项目名称:nostalgames,代码行数:24,代码来源:FixtureTask.php

示例4: execute

/**
 * Execution method always used for tasks
 *
 * @return void
 */
	public function execute() {
		parent::execute();
		if (empty($this->args)) {
			return $this->_interactive();
		}

		if (isset($this->args[0])) {
			if (!isset($this->connection)) {
				$this->connection = 'default';
			}
			if (strtolower($this->args[0]) === 'all') {
				return $this->all();
			}

			$controller = $this->_controllerName($this->args[0]);
			$actions = '';

			if (!empty($this->params['public'])) {
				$this->out(__d('cake_console', 'Baking basic crud methods for ') . $controller);
				$actions .= $this->bakeActions($controller);
			}
			if (!empty($this->params['admin'])) {
				$admin = $this->Project->getPrefix();
				if ($admin) {
					$this->out(__d('cake_console', 'Adding %s methods', $admin));
					$actions .= "\n" . $this->bakeActions($controller, $admin);
				}
			}
			if (empty($actions)) {
				$actions = 'scaffold';
			}

			if ($this->bake($controller, $actions)) {
				if ($this->_checkUnitTest()) {
					$this->bakeTest($controller);
				}
			}
		}
	}
开发者ID:hungnt88,项目名称:5stars-1,代码行数:44,代码来源:ControllerTask.php

示例5: execute

 /**
  * Execution method always used for tasks
  *
  * @return void
  */
 public function execute()
 {
     parent::execute();
 }
开发者ID:br-nhan,项目名称:AjaxTemplate,代码行数:9,代码来源:ExtControllerTask.php


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