mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-10 05:22:41 +00:00
update api shell core paths
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6082 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
39b37c5c34
commit
d793d40dac
1 changed files with 11 additions and 8 deletions
|
@ -54,7 +54,8 @@ class ApiShell extends Shell {
|
|||
'component' => LIBS . 'controller' . DS . 'components' . DS,
|
||||
'helper' => LIBS . 'view' . DS . 'helpers' . DS,
|
||||
'model' => LIBS . 'model' . DS,
|
||||
'view' => LIBS . 'view' . DS
|
||||
'view' => LIBS . 'view' . DS,
|
||||
'core' => LIBS
|
||||
));
|
||||
}
|
||||
/**
|
||||
|
@ -69,13 +70,12 @@ class ApiShell extends Shell {
|
|||
|
||||
$type = low($this->args[0]);
|
||||
|
||||
if (!isset($this->paths[$type])) {
|
||||
$this->err(sprintf(__("%s could not be found", true), $path));
|
||||
exit();
|
||||
if (isset($this->paths[$type])) {
|
||||
$path = $this->paths[$type];
|
||||
} else {
|
||||
$path = $this->paths['core'];
|
||||
}
|
||||
|
||||
$path = $this->paths[$type];
|
||||
|
||||
if (count($this->args) == 1) {
|
||||
$file = $type;
|
||||
$class = Inflector::camelize($type);
|
||||
|
@ -92,6 +92,9 @@ class ApiShell extends Shell {
|
|||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->err(sprintf(__("%s not found", true), $class));
|
||||
exit();
|
||||
}
|
||||
|
||||
$parsed = $this->__parseClass($path . $file .'.php');
|
||||
|
@ -149,8 +152,8 @@ class ApiShell extends Shell {
|
|||
$head .= "Parameters:\n\n";
|
||||
|
||||
$commands = array(
|
||||
'path' => "\t<path>\n" .
|
||||
"\t\tEither a full path or an indicator on where the class is stored.\n".
|
||||
'path' => "\t<type>\n" .
|
||||
"\t\tEither a full path or type of class (model, behavior, controller, component, view, helper).\n".
|
||||
"\t\tAvailable values:\n\n".
|
||||
"\t\tbehavior\tLook for class in CakePHP behavior path\n".
|
||||
"\t\tcache\tLook for class in CakePHP cache path\n".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue