path = $this->params['working'] . DS . 'tests' . DS . 'fixtures' . DS; } /** * Execution method always used for tasks * * @access public */ function execute() { if (empty($this->args)) { $this->__interactive(); } if (isset($this->args[0])) { if (strtolower($this->args[0]) == 'all') { return $this->all(); } $controller = Inflector::camelize($this->args[0]); $actions = null; if (isset($this->args[1]) && $this->args[1] == 'scaffold') { $this->out('Baking scaffold for ' . $controller); $actions = $this->bakeActions($controller); } else { $actions = 'scaffold'; } if ($this->bake($controller, $actions)) { if ($this->_checkUnitTest()) { $this->bakeTest($controller); } } } } /** * Bake All the Fixtures at once. Will only bake fixtures for models that exist. * * @access public * @return void **/ function all() { $ds = 'default'; if (isset($this->params['connection'])) { $ds = $this->params['connection']; } } /** * Interactive baking function * * @access private */ function __interactive($modelName = false) { $this->interactive = true; $this->hr(); $this->out(sprintf("Bake Fixture\nPath: %s", $this->path)); $this->hr(); $useDbConfig = $this->DbConfig->getConfig(); } /** * Assembles and writes a Fixture file * * @return string Baked fixture * @access private */ function bake() { } /** * Displays help contents * * @access public */ function help() { $this->hr(); $this->out("Usage: cake bake fixture ..."); $this->hr(); $this->out('Commands:'); $this->out("\n\fixture \n\t\tbakes fixture with specified name."); $this->out("\n\fixture all\n\t\tbakes all fixtures."); $this->out(""); $this->_stop(); } } ?>