當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。