Initial commit
|
@ -0,0 +1,152 @@
|
|||
<?php
|
||||
/**
|
||||
* Bake Template for Controller action generation.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.actions
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
|
||||
/**
|
||||
* <?php echo $admin ?>index method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function <?php echo $admin ?>index() {
|
||||
$this-><?php echo $currentModelName ?>->recursive = 0;
|
||||
$this->set('<?php echo $pluralName ?>', $this->Paginator->paginate());
|
||||
}
|
||||
|
||||
/**
|
||||
* <?php echo $admin ?>view method
|
||||
*
|
||||
* @throws NotFoundException
|
||||
* @param string $id
|
||||
* @return void
|
||||
*/
|
||||
public function <?php echo $admin ?>view($id = null) {
|
||||
if (!$this-><?php echo $currentModelName; ?>->exists($id)) {
|
||||
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
||||
}
|
||||
$options = array('conditions' => array('<?php echo $currentModelName; ?>.' . $this-><?php echo $currentModelName; ?>->primaryKey => $id));
|
||||
$this->set('<?php echo $singularName; ?>', $this-><?php echo $currentModelName; ?>->find('first', $options));
|
||||
}
|
||||
|
||||
<?php $compact = array(); ?>
|
||||
/**
|
||||
* <?php echo $admin ?>add method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function <?php echo $admin ?>add() {
|
||||
if ($this->request->is('post')) {
|
||||
$this-><?php echo $currentModelName; ?>->create();
|
||||
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
|
||||
<?php if ($wannaUseSession): ?>
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'));
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be saved. Please, try again.'));
|
||||
<?php else: ?>
|
||||
return $this->flash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
}
|
||||
}
|
||||
<?php
|
||||
foreach (array('belongsTo', 'hasAndBelongsToMany') as $assoc):
|
||||
foreach ($modelObj->{$assoc} as $associationName => $relation):
|
||||
if (!empty($associationName)):
|
||||
$otherModelName = $this->_modelName($associationName);
|
||||
$otherPluralName = $this->_pluralName($associationName);
|
||||
echo "\t\t\${$otherPluralName} = \$this->{$currentModelName}->{$otherModelName}->find('list');\n";
|
||||
$compact[] = "'{$otherPluralName}'";
|
||||
endif;
|
||||
endforeach;
|
||||
endforeach;
|
||||
if (!empty($compact)):
|
||||
echo "\t\t\$this->set(compact(".join(', ', $compact)."));\n";
|
||||
endif;
|
||||
?>
|
||||
}
|
||||
|
||||
<?php $compact = array(); ?>
|
||||
/**
|
||||
* <?php echo $admin ?>edit method
|
||||
*
|
||||
* @throws NotFoundException
|
||||
* @param string $id
|
||||
* @return void
|
||||
*/
|
||||
public function <?php echo $admin; ?>edit($id = null) {
|
||||
if (!$this-><?php echo $currentModelName; ?>->exists($id)) {
|
||||
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
||||
}
|
||||
if ($this->request->is(array('post', 'put'))) {
|
||||
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
|
||||
<?php if ($wannaUseSession): ?>
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'));
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be saved. Please, try again.'));
|
||||
<?php else: ?>
|
||||
return $this->flash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
}
|
||||
} else {
|
||||
$options = array('conditions' => array('<?php echo $currentModelName; ?>.' . $this-><?php echo $currentModelName; ?>->primaryKey => $id));
|
||||
$this->request->data = $this-><?php echo $currentModelName; ?>->find('first', $options);
|
||||
}
|
||||
<?php
|
||||
foreach (array('belongsTo', 'hasAndBelongsToMany') as $assoc):
|
||||
foreach ($modelObj->{$assoc} as $associationName => $relation):
|
||||
if (!empty($associationName)):
|
||||
$otherModelName = $this->_modelName($associationName);
|
||||
$otherPluralName = $this->_pluralName($associationName);
|
||||
echo "\t\t\${$otherPluralName} = \$this->{$currentModelName}->{$otherModelName}->find('list');\n";
|
||||
$compact[] = "'{$otherPluralName}'";
|
||||
endif;
|
||||
endforeach;
|
||||
endforeach;
|
||||
if (!empty($compact)):
|
||||
echo "\t\t\$this->set(compact(".join(', ', $compact)."));\n";
|
||||
endif;
|
||||
?>
|
||||
}
|
||||
|
||||
/**
|
||||
* <?php echo $admin ?>delete method
|
||||
*
|
||||
* @throws NotFoundException
|
||||
* @param string $id
|
||||
* @return void
|
||||
*/
|
||||
public function <?php echo $admin; ?>delete($id = null) {
|
||||
$this-><?php echo $currentModelName; ?>->id = $id;
|
||||
if (!$this-><?php echo $currentModelName; ?>->exists()) {
|
||||
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
||||
}
|
||||
$this->request->allowMethod('post', 'delete');
|
||||
if ($this-><?php echo $currentModelName; ?>->delete()) {
|
||||
<?php if ($wannaUseSession): ?>
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been deleted.'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be deleted. Please, try again.'));
|
||||
}
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
<?php else: ?>
|
||||
return $this->flash(__('The <?php echo strtolower($singularHumanName); ?> has been deleted.'), array('action' => 'index'));
|
||||
} else {
|
||||
return $this->flash(__('The <?php echo strtolower($singularHumanName); ?> could not be deleted. Please, try again.'), array('action' => 'index'));
|
||||
}
|
||||
<?php endif; ?>
|
||||
}
|
82
lib/Cake/Console/Templates/default/classes/controller.ctp
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* Controller bake template file
|
||||
*
|
||||
* Allows templating of Controllers generated from bake.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.classes
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
echo "<?php\n";
|
||||
echo "App::uses('{$plugin}AppController', '{$pluginPath}Controller');\n";
|
||||
?>
|
||||
/**
|
||||
* <?php echo $controllerName; ?> Controller
|
||||
*
|
||||
<?php
|
||||
if (!$isScaffold) {
|
||||
$defaultModel = Inflector::singularize($controllerName);
|
||||
echo " * @property {$defaultModel} \${$defaultModel}\n";
|
||||
if (!empty($components)) {
|
||||
foreach ($components as $component) {
|
||||
echo " * @property {$component}Component \${$component}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
*/
|
||||
class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>AppController {
|
||||
|
||||
<?php if ($isScaffold): ?>
|
||||
/**
|
||||
* Scaffold
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
public $scaffold;
|
||||
|
||||
<?php else:
|
||||
|
||||
if (count($helpers)):
|
||||
echo "/**\n * Helpers\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$helpers = array(";
|
||||
for ($i = 0, $len = count($helpers); $i < $len; $i++):
|
||||
if ($i != $len - 1):
|
||||
echo "'" . Inflector::camelize($helpers[$i]) . "', ";
|
||||
else:
|
||||
echo "'" . Inflector::camelize($helpers[$i]) . "'";
|
||||
endif;
|
||||
endfor;
|
||||
echo ");\n\n";
|
||||
endif;
|
||||
|
||||
if (count($components)):
|
||||
echo "/**\n * Components\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$components = array(";
|
||||
for ($i = 0, $len = count($components); $i < $len; $i++):
|
||||
if ($i != $len - 1):
|
||||
echo "'" . Inflector::camelize($components[$i]) . "', ";
|
||||
else:
|
||||
echo "'" . Inflector::camelize($components[$i]) . "'";
|
||||
endif;
|
||||
endfor;
|
||||
echo ");\n\n";
|
||||
endif;
|
||||
|
||||
if (!empty($actions)) {
|
||||
echo trim($actions) . "\n";
|
||||
}
|
||||
|
||||
endif; ?>
|
||||
}
|
65
lib/Cake/Console/Templates/default/classes/fixture.ctp
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
/**
|
||||
* Fixture Template file
|
||||
*
|
||||
* Fixture Template used when baking fixtures with bake
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.classes
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
echo "<?php\n";
|
||||
?>
|
||||
/**
|
||||
* <?php echo $model; ?>Fixture
|
||||
*
|
||||
*/
|
||||
class <?php echo $model; ?>Fixture extends CakeTestFixture {
|
||||
|
||||
<?php if ($table): ?>
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = '<?php echo $table; ?>';
|
||||
|
||||
<?php endif; ?>
|
||||
<?php if ($import): ?>
|
||||
/**
|
||||
* Import
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $import = <?php echo $import; ?>;
|
||||
|
||||
<?php endif; ?>
|
||||
<?php if ($schema): ?>
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = <?php echo $schema; ?>;
|
||||
|
||||
<?php endif; ?>
|
||||
<?php if ($records): ?>
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = <?php echo $records; ?>;
|
||||
|
||||
<?php endif; ?>
|
||||
}
|
189
lib/Cake/Console/Templates/default/classes/model.ctp
Normal file
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
/**
|
||||
* Model template file.
|
||||
*
|
||||
* Used by bake to create new Model files.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.classes
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
echo "<?php\n";
|
||||
echo "App::uses('{$plugin}AppModel', '{$pluginPath}Model');\n";
|
||||
?>
|
||||
/**
|
||||
* <?php echo $name ?> Model
|
||||
*
|
||||
<?php
|
||||
foreach (array('hasOne', 'belongsTo', 'hasMany', 'hasAndBelongsToMany') as $assocType) {
|
||||
if (!empty($associations[$assocType])) {
|
||||
foreach ($associations[$assocType] as $relation) {
|
||||
echo " * @property {$relation['className']} \${$relation['alias']}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
*/
|
||||
class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
|
||||
|
||||
<?php if ($useDbConfig !== 'default'): ?>
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = '<?php echo $useDbConfig; ?>';
|
||||
|
||||
<?php endif;
|
||||
|
||||
if ($useTable && $useTable !== Inflector::tableize($name)):
|
||||
$table = "'$useTable'";
|
||||
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
|
||||
echo "\tpublic \$useTable = $table;\n\n";
|
||||
endif;
|
||||
|
||||
if ($primaryKey !== 'id'): ?>
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = '<?php echo $primaryKey; ?>';
|
||||
|
||||
<?php endif;
|
||||
|
||||
if ($displayField): ?>
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = '<?php echo $displayField; ?>';
|
||||
|
||||
<?php endif;
|
||||
|
||||
if (!empty($actsAs)): ?>
|
||||
/**
|
||||
* Behaviors
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $actsAs = array(<?php echo "\n\t"; foreach ($actsAs as $behavior): echo "\t"; var_export($behavior); echo ",\n\t"; endforeach; ?>);
|
||||
|
||||
<?php endif;
|
||||
|
||||
if (!empty($validate)):
|
||||
echo "/**\n * Validation rules\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$validate = array(\n";
|
||||
foreach ($validate as $field => $validations):
|
||||
echo "\t\t'$field' => array(\n";
|
||||
foreach ($validations as $key => $validator):
|
||||
echo "\t\t\t'$key' => array(\n";
|
||||
echo "\t\t\t\t'rule' => array('$validator'),\n";
|
||||
echo "\t\t\t\t//'message' => 'Your custom message here',\n";
|
||||
echo "\t\t\t\t//'allowEmpty' => false,\n";
|
||||
echo "\t\t\t\t//'required' => false,\n";
|
||||
echo "\t\t\t\t//'last' => false, // Stop validation after this rule\n";
|
||||
echo "\t\t\t\t//'on' => 'create', // Limit validation to 'create' or 'update' operations\n";
|
||||
echo "\t\t\t),\n";
|
||||
endforeach;
|
||||
echo "\t\t),\n";
|
||||
endforeach;
|
||||
echo "\t);\n";
|
||||
endif;
|
||||
|
||||
foreach ($associations as $assoc):
|
||||
if (!empty($assoc)):
|
||||
?>
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
<?php
|
||||
break;
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
foreach (array('hasOne', 'belongsTo') as $assocType):
|
||||
if (!empty($associations[$assocType])):
|
||||
$typeCount = count($associations[$assocType]);
|
||||
echo "\n/**\n * $assocType associations\n *\n * @var array\n */";
|
||||
echo "\n\tpublic \$$assocType = array(";
|
||||
foreach ($associations[$assocType] as $i => $relation):
|
||||
$out = "\n\t\t'{$relation['alias']}' => array(\n";
|
||||
$out .= "\t\t\t'className' => '{$relation['className']}',\n";
|
||||
$out .= "\t\t\t'foreignKey' => '{$relation['foreignKey']}',\n";
|
||||
$out .= "\t\t\t'conditions' => '',\n";
|
||||
$out .= "\t\t\t'fields' => '',\n";
|
||||
$out .= "\t\t\t'order' => ''\n";
|
||||
$out .= "\t\t)";
|
||||
if ($i + 1 < $typeCount) {
|
||||
$out .= ",";
|
||||
}
|
||||
echo $out;
|
||||
endforeach;
|
||||
echo "\n\t);\n";
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
if (!empty($associations['hasMany'])):
|
||||
$belongsToCount = count($associations['hasMany']);
|
||||
echo "\n/**\n * hasMany associations\n *\n * @var array\n */";
|
||||
echo "\n\tpublic \$hasMany = array(";
|
||||
foreach ($associations['hasMany'] as $i => $relation):
|
||||
$out = "\n\t\t'{$relation['alias']}' => array(\n";
|
||||
$out .= "\t\t\t'className' => '{$relation['className']}',\n";
|
||||
$out .= "\t\t\t'foreignKey' => '{$relation['foreignKey']}',\n";
|
||||
$out .= "\t\t\t'dependent' => false,\n";
|
||||
$out .= "\t\t\t'conditions' => '',\n";
|
||||
$out .= "\t\t\t'fields' => '',\n";
|
||||
$out .= "\t\t\t'order' => '',\n";
|
||||
$out .= "\t\t\t'limit' => '',\n";
|
||||
$out .= "\t\t\t'offset' => '',\n";
|
||||
$out .= "\t\t\t'exclusive' => '',\n";
|
||||
$out .= "\t\t\t'finderQuery' => '',\n";
|
||||
$out .= "\t\t\t'counterQuery' => ''\n";
|
||||
$out .= "\t\t)";
|
||||
if ($i + 1 < $belongsToCount) {
|
||||
$out .= ",";
|
||||
}
|
||||
echo $out;
|
||||
endforeach;
|
||||
echo "\n\t);\n\n";
|
||||
endif;
|
||||
|
||||
if (!empty($associations['hasAndBelongsToMany'])):
|
||||
$habtmCount = count($associations['hasAndBelongsToMany']);
|
||||
echo "\n/**\n * hasAndBelongsToMany associations\n *\n * @var array\n */";
|
||||
echo "\n\tpublic \$hasAndBelongsToMany = array(";
|
||||
foreach ($associations['hasAndBelongsToMany'] as $i => $relation):
|
||||
$out = "\n\t\t'{$relation['alias']}' => array(\n";
|
||||
$out .= "\t\t\t'className' => '{$relation['className']}',\n";
|
||||
$out .= "\t\t\t'joinTable' => '{$relation['joinTable']}',\n";
|
||||
$out .= "\t\t\t'foreignKey' => '{$relation['foreignKey']}',\n";
|
||||
$out .= "\t\t\t'associationForeignKey' => '{$relation['associationForeignKey']}',\n";
|
||||
$out .= "\t\t\t'unique' => 'keepExisting',\n";
|
||||
$out .= "\t\t\t'conditions' => '',\n";
|
||||
$out .= "\t\t\t'fields' => '',\n";
|
||||
$out .= "\t\t\t'order' => '',\n";
|
||||
$out .= "\t\t\t'limit' => '',\n";
|
||||
$out .= "\t\t\t'offset' => '',\n";
|
||||
$out .= "\t\t\t'finderQuery' => '',\n";
|
||||
$out .= "\t\t)";
|
||||
if ($i + 1 < $habtmCount) {
|
||||
$out .= ",";
|
||||
}
|
||||
echo $out;
|
||||
endforeach;
|
||||
echo "\n\t);\n\n";
|
||||
endif;
|
||||
?>
|
||||
}
|
82
lib/Cake/Console/Templates/default/classes/test.ctp
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* Test Case bake template
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.classes
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
echo "<?php\n";
|
||||
?>
|
||||
<?php foreach ($uses as $dependency): ?>
|
||||
App::uses('<?php echo $dependency[0]; ?>', '<?php echo $dependency[1]; ?>');
|
||||
<?php endforeach; ?>
|
||||
|
||||
/**
|
||||
* <?php echo $fullClassName; ?> Test Case
|
||||
*
|
||||
*/
|
||||
<?php if ($type === 'Controller'): ?>
|
||||
class <?php echo $fullClassName; ?>Test extends ControllerTestCase {
|
||||
<?php else: ?>
|
||||
class <?php echo $fullClassName; ?>Test extends CakeTestCase {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($fixtures)): ?>
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'<?php echo join("',\n\t\t'", $fixtures); ?>'
|
||||
);
|
||||
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($construction)): ?>
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
<?php echo $preConstruct ? "\t\t" . $preConstruct : ''; ?>
|
||||
$this-><?php echo $className . ' = ' . $construction; ?>
|
||||
<?php echo $postConstruct ? "\t\t" . $postConstruct : ''; ?>
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this-><?php echo $className; ?>);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
<?php endif; ?>
|
||||
<?php foreach ($methods as $method): ?>
|
||||
/**
|
||||
* test<?php echo Inflector::camelize($method); ?> method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test<?php echo Inflector::camelize($method); ?>() {
|
||||
$this->markTestIncomplete('test<?php echo Inflector::camelize($method); ?> not implemented.');
|
||||
}
|
||||
|
||||
<?php endforeach; ?>
|
||||
}
|
63
lib/Cake/Console/Templates/default/views/form.ctp
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.views
|
||||
* @since CakePHP(tm) v 1.2.0.5234
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<div class="<?php echo $pluralVar; ?> form">
|
||||
<?php echo "<?php echo \$this->Form->create('{$modelClass}'); ?>\n"; ?>
|
||||
<fieldset>
|
||||
<legend><?php printf("<?php echo __('%s %s'); ?>", Inflector::humanize($action), $singularHumanName); ?></legend>
|
||||
<?php
|
||||
echo "\t<?php\n";
|
||||
foreach ($fields as $field) {
|
||||
if (strpos($action, 'add') !== false && $field === $primaryKey) {
|
||||
continue;
|
||||
} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
|
||||
echo "\t\techo \$this->Form->input('{$field}');\n";
|
||||
}
|
||||
}
|
||||
if (!empty($associations['hasAndBelongsToMany'])) {
|
||||
foreach ($associations['hasAndBelongsToMany'] as $assocName => $assocData) {
|
||||
echo "\t\techo \$this->Form->input('{$assocName}');\n";
|
||||
}
|
||||
}
|
||||
echo "\t?>\n";
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo "<?php echo \$this->Form->end(__('Submit')); ?>\n";
|
||||
?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<h3><?php echo "<?php echo __('Actions'); ?>"; ?></h3>
|
||||
<ul>
|
||||
|
||||
<?php if (strpos($action, 'add') === false): ?>
|
||||
<li><?php echo "<?php echo \$this->Form->postLink(__('Delete'), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), array(), __('Are you sure you want to delete # %s?', \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>"; ?></li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo "<?php echo \$this->Html->link(__('List " . $pluralHumanName . "'), array('action' => 'index')); ?>"; ?></li>
|
||||
<?php
|
||||
$done = array();
|
||||
foreach ($associations as $type => $data) {
|
||||
foreach ($data as $alias => $details) {
|
||||
if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('List " . Inflector::humanize($details['controller']) . "'), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
|
||||
$done[] = $details['controller'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
93
lib/Cake/Console/Templates/default/views/index.ctp
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.views
|
||||
* @since CakePHP(tm) v 1.2.0.5234
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<div class="<?php echo $pluralVar; ?> index">
|
||||
<h2><?php echo "<?php echo __('{$pluralHumanName}'); ?>"; ?></h2>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<th><?php echo "<?php echo \$this->Paginator->sort('{$field}'); ?>"; ?></th>
|
||||
<?php endforeach; ?>
|
||||
<th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
echo "<?php foreach (\${$pluralVar} as \${$singularVar}): ?>\n";
|
||||
echo "\t<tr>\n";
|
||||
foreach ($fields as $field) {
|
||||
$isKey = false;
|
||||
if (!empty($associations['belongsTo'])) {
|
||||
foreach ($associations['belongsTo'] as $alias => $details) {
|
||||
if ($field === $details['foreignKey']) {
|
||||
$isKey = true;
|
||||
echo "\t\t<td>\n\t\t\t<?php echo \$this->Html->link(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t</td>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($isKey !== true) {
|
||||
echo "\t\t<td><?php echo h(\${$singularVar}['{$modelClass}']['{$field}']); ?> </td>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "\t\t<td class=\"actions\">\n";
|
||||
echo "\t\t\t<?php echo \$this->Html->link(__('View'), array('action' => 'view', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
|
||||
echo "\t\t\t<?php echo \$this->Html->link(__('Edit'), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
|
||||
echo "\t\t\t<?php echo \$this->Form->postLink(__('Delete'), array('action' => 'delete', \${$singularVar}['{$modelClass}']['{$primaryKey}']), array(), __('Are you sure you want to delete # %s?', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
|
||||
echo "\t\t</td>\n";
|
||||
echo "\t</tr>\n";
|
||||
|
||||
echo "<?php endforeach; ?>\n";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<?php echo "<?php
|
||||
echo \$this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>"; ?>
|
||||
</p>
|
||||
<div class="paging">
|
||||
<?php
|
||||
echo "<?php\n";
|
||||
echo "\t\techo \$this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));\n";
|
||||
echo "\t\techo \$this->Paginator->numbers(array('separator' => ''));\n";
|
||||
echo "\t\techo \$this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));\n";
|
||||
echo "\t?>\n";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<h3><?php echo "<?php echo __('Actions'); ?>"; ?></h3>
|
||||
<ul>
|
||||
<li><?php echo "<?php echo \$this->Html->link(__('New " . $singularHumanName . "'), array('action' => 'add')); ?>"; ?></li>
|
||||
<?php
|
||||
$done = array();
|
||||
foreach ($associations as $type => $data) {
|
||||
foreach ($data as $alias => $details) {
|
||||
if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('List " . Inflector::humanize($details['controller']) . "'), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
|
||||
$done[] = $details['controller'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
134
lib/Cake/Console/Templates/default/views/view.ctp
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Console.Templates.default.views
|
||||
* @since CakePHP(tm) v 1.2.0.5234
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<div class="<?php echo $pluralVar; ?> view">
|
||||
<h2><?php echo "<?php echo __('{$singularHumanName}'); ?>"; ?></h2>
|
||||
<dl>
|
||||
<?php
|
||||
foreach ($fields as $field) {
|
||||
$isKey = false;
|
||||
if (!empty($associations['belongsTo'])) {
|
||||
foreach ($associations['belongsTo'] as $alias => $details) {
|
||||
if ($field === $details['foreignKey']) {
|
||||
$isKey = true;
|
||||
echo "\t\t<dt><?php echo __('" . Inflector::humanize(Inflector::underscore($alias)) . "'); ?></dt>\n";
|
||||
echo "\t\t<dd>\n\t\t\t<?php echo \$this->Html->link(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t\t \n\t\t</dd>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($isKey !== true) {
|
||||
echo "\t\t<dt><?php echo __('" . Inflector::humanize($field) . "'); ?></dt>\n";
|
||||
echo "\t\t<dd>\n\t\t\t<?php echo h(\${$singularVar}['{$modelClass}']['{$field}']); ?>\n\t\t\t \n\t\t</dd>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<h3><?php echo "<?php echo __('Actions'); ?>"; ?></h3>
|
||||
<ul>
|
||||
<?php
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('Edit " . $singularHumanName ."'), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?> </li>\n";
|
||||
echo "\t\t<li><?php echo \$this->Form->postLink(__('Delete " . $singularHumanName . "'), array('action' => 'delete', \${$singularVar}['{$modelClass}']['{$primaryKey}']), array(), __('Are you sure you want to delete # %s?', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?> </li>\n";
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('List " . $pluralHumanName . "'), array('action' => 'index')); ?> </li>\n";
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('New " . $singularHumanName . "'), array('action' => 'add')); ?> </li>\n";
|
||||
|
||||
$done = array();
|
||||
foreach ($associations as $type => $data) {
|
||||
foreach ($data as $alias => $details) {
|
||||
if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('List " . Inflector::humanize($details['controller']) . "'), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
|
||||
echo "\t\t<li><?php echo \$this->Html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
|
||||
$done[] = $details['controller'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
if (!empty($associations['hasOne'])) :
|
||||
foreach ($associations['hasOne'] as $alias => $details): ?>
|
||||
<div class="related">
|
||||
<h3><?php echo "<?php echo __('Related " . Inflector::humanize($details['controller']) . "'); ?>"; ?></h3>
|
||||
<?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])): ?>\n"; ?>
|
||||
<dl>
|
||||
<?php
|
||||
foreach ($details['fields'] as $field) {
|
||||
echo "\t\t<dt><?php echo __('" . Inflector::humanize($field) . "'); ?></dt>\n";
|
||||
echo "\t\t<dd>\n\t<?php echo \${$singularVar}['{$alias}']['{$field}']; ?>\n </dd>\n";
|
||||
}
|
||||
?>
|
||||
</dl>
|
||||
<?php echo "<?php endif; ?>\n"; ?>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<li><?php echo "<?php echo \$this->Html->link(__('Edit " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?></li>\n"; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
if (empty($associations['hasMany'])) {
|
||||
$associations['hasMany'] = array();
|
||||
}
|
||||
if (empty($associations['hasAndBelongsToMany'])) {
|
||||
$associations['hasAndBelongsToMany'] = array();
|
||||
}
|
||||
$relations = array_merge($associations['hasMany'], $associations['hasAndBelongsToMany']);
|
||||
foreach ($relations as $alias => $details):
|
||||
$otherSingularVar = Inflector::variable($alias);
|
||||
$otherPluralHumanName = Inflector::humanize($details['controller']);
|
||||
?>
|
||||
<div class="related">
|
||||
<h3><?php echo "<?php echo __('Related " . $otherPluralHumanName . "'); ?>"; ?></h3>
|
||||
<?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])): ?>\n"; ?>
|
||||
<table cellpadding = "0" cellspacing = "0">
|
||||
<tr>
|
||||
<?php
|
||||
foreach ($details['fields'] as $field) {
|
||||
echo "\t\t<th><?php echo __('" . Inflector::humanize($field) . "'); ?></th>\n";
|
||||
}
|
||||
?>
|
||||
<th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
echo "\t<?php foreach (\${$singularVar}['{$alias}'] as \${$otherSingularVar}): ?>\n";
|
||||
echo "\t\t<tr>\n";
|
||||
foreach ($details['fields'] as $field) {
|
||||
echo "\t\t\t<td><?php echo \${$otherSingularVar}['{$field}']; ?></td>\n";
|
||||
}
|
||||
|
||||
echo "\t\t\t<td class=\"actions\">\n";
|
||||
echo "\t\t\t\t<?php echo \$this->Html->link(__('View'), array('controller' => '{$details['controller']}', 'action' => 'view', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
|
||||
echo "\t\t\t\t<?php echo \$this->Html->link(__('Edit'), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
|
||||
echo "\t\t\t\t<?php echo \$this->Form->postLink(__('Delete'), array('controller' => '{$details['controller']}', 'action' => 'delete', \${$otherSingularVar}['{$details['primaryKey']}']), array(), __('Are you sure you want to delete # %s?', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
|
||||
echo "\t\t\t</td>\n";
|
||||
echo "\t\t</tr>\n";
|
||||
|
||||
echo "\t<?php endforeach; ?>\n";
|
||||
?>
|
||||
</table>
|
||||
<?php echo "<?php endif; ?>\n\n"; ?>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<li><?php echo "<?php echo \$this->Html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'add')); ?>"; ?> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
5
lib/Cake/Console/Templates/skel/.htaccess
Normal file
|
@ -0,0 +1,5 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ webroot/ [L]
|
||||
RewriteRule (.*) webroot/$1 [L]
|
||||
</IfModule>
|
82
lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* This is Acl Schema file
|
||||
*
|
||||
* Use it to configure database for ACL
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config.Schema
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Using the Schema command line utility
|
||||
* cake schema run create DbAcl
|
||||
*
|
||||
*/
|
||||
class DbAclSchema extends CakeSchema {
|
||||
|
||||
/**
|
||||
* Before event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return bool success
|
||||
*/
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* After event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return void
|
||||
*/
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
/**
|
||||
* ACO - Access Control Object - Something that is wanted
|
||||
*/
|
||||
public $acos = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'model' => array('type' => 'string', 'null' => true),
|
||||
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'alias' => array('type' => 'string', 'null' => true),
|
||||
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||
);
|
||||
|
||||
/**
|
||||
* ARO - Access Request Object - Something that wants something
|
||||
*/
|
||||
public $aros = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'model' => array('type' => 'string', 'null' => true),
|
||||
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'alias' => array('type' => 'string', 'null' => true),
|
||||
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||
);
|
||||
|
||||
/**
|
||||
* Used by the Cake::Model:Permission class.
|
||||
* Checks if the given $aro has access to action $action in $aco.
|
||||
*/
|
||||
public $aros_acos = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
||||
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
|
||||
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
|
||||
);
|
||||
|
||||
}
|
41
lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql
Normal file
|
@ -0,0 +1,41 @@
|
|||
# $Id$
|
||||
#
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE acos (
|
||||
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
parent_id INTEGER(10) DEFAULT NULL,
|
||||
model VARCHAR(255) DEFAULT '',
|
||||
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
|
||||
alias VARCHAR(255) DEFAULT '',
|
||||
lft INTEGER(10) DEFAULT NULL,
|
||||
rght INTEGER(10) DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE aros_acos (
|
||||
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
aro_id INTEGER(10) UNSIGNED NOT NULL,
|
||||
aco_id INTEGER(10) UNSIGNED NOT NULL,
|
||||
_create CHAR(2) NOT NULL DEFAULT 0,
|
||||
_read CHAR(2) NOT NULL DEFAULT 0,
|
||||
_update CHAR(2) NOT NULL DEFAULT 0,
|
||||
_delete CHAR(2) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY(id)
|
||||
);
|
||||
|
||||
CREATE TABLE aros (
|
||||
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
parent_id INTEGER(10) DEFAULT NULL,
|
||||
model VARCHAR(255) DEFAULT '',
|
||||
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
|
||||
alias VARCHAR(255) DEFAULT '',
|
||||
lft INTEGER(10) DEFAULT NULL,
|
||||
rght INTEGER(10) DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
62
lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* This is i18n Schema file
|
||||
*
|
||||
* Use it to configure database for i18n
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config.Schema
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* Using the Schema command line utility
|
||||
*
|
||||
* Use it to configure database for i18n
|
||||
*
|
||||
* cake schema run create i18n
|
||||
*/
|
||||
class I18nSchema extends CakeSchema {
|
||||
|
||||
/**
|
||||
* The name property
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'i18n';
|
||||
|
||||
/**
|
||||
* Before event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return bool success
|
||||
*/
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* After event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return void
|
||||
*/
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The i18n table property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $i18n = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
|
||||
'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
|
||||
'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
||||
'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
|
||||
'content' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
|
||||
);
|
||||
|
||||
}
|
27
lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql
Normal file
|
@ -0,0 +1,27 @@
|
|||
# $Id$
|
||||
#
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE i18n (
|
||||
id int(10) NOT NULL auto_increment,
|
||||
locale varchar(6) NOT NULL,
|
||||
model varchar(255) NOT NULL,
|
||||
foreign_key int(10) NOT NULL,
|
||||
field varchar(255) NOT NULL,
|
||||
content mediumtext,
|
||||
PRIMARY KEY (id),
|
||||
# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
|
||||
# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
|
||||
# INDEX I18N_LOCALE_MODEL(locale, model),
|
||||
# INDEX I18N_FIELD(model, foreign_key, field),
|
||||
# INDEX I18N_ROW(model, foreign_key),
|
||||
INDEX locale (locale),
|
||||
INDEX model (model),
|
||||
INDEX row_id (foreign_key),
|
||||
INDEX field (field)
|
||||
);
|
57
lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
/**
|
||||
* This is Sessions Schema file
|
||||
*
|
||||
* Use it to configure database for Sessions
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config.Schema
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* Using the Schema command line utility
|
||||
* cake schema run create Sessions
|
||||
*
|
||||
*/
|
||||
class SessionsSchema extends CakeSchema {
|
||||
|
||||
/**
|
||||
* Name property
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'Sessions';
|
||||
|
||||
/**
|
||||
* Before event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return bool Success
|
||||
*/
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* After event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return void
|
||||
*/
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
/**
|
||||
* cake_sessions table definition
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $cake_sessions = array(
|
||||
'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'),
|
||||
'data' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||
'expires' => array('type' => 'integer', 'null' => true, 'default' => null),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||
);
|
||||
|
||||
}
|
17
lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql
Normal file
|
@ -0,0 +1,17 @@
|
|||
# $Id$
|
||||
#
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
# 1785 E. Sahara Avenue, Suite 490-204
|
||||
# Las Vegas, Nevada 89104
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE cake_sessions (
|
||||
id varchar(255) NOT NULL default '',
|
||||
data text,
|
||||
expires int(11) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
57
lib/Cake/Console/Templates/skel/Config/acl.ini.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
;<?php exit() ?>
|
||||
;/**
|
||||
; * ACL Configuration
|
||||
; *
|
||||
; * @link http://cakephp.org CakePHP(tm) Project
|
||||
; * @package app.Config
|
||||
; * @since CakePHP(tm) v 0.10.0.1076
|
||||
; */
|
||||
|
||||
; acl.ini.php - CakePHP ACL Configuration
|
||||
; ---------------------------------------------------------------------
|
||||
; Use this file to specify user permissions.
|
||||
; aco = access control object (something in your application)
|
||||
; aro = access request object (something requesting access)
|
||||
;
|
||||
; User records are added as follows:
|
||||
;
|
||||
; [uid]
|
||||
; groups = group1, group2, group3
|
||||
; allow = aco1, aco2, aco3
|
||||
; deny = aco4, aco5, aco6
|
||||
;
|
||||
; Group records are added in a similar manner:
|
||||
;
|
||||
; [gid]
|
||||
; allow = aco1, aco2, aco3
|
||||
; deny = aco4, aco5, aco6
|
||||
;
|
||||
; The allow, deny, and groups sections are all optional.
|
||||
; NOTE: groups names *cannot* ever be the same as usernames!
|
||||
;
|
||||
; ACL permissions are checked in the following order:
|
||||
; 1. Check for user denies (and DENY if specified)
|
||||
; 2. Check for user allows (and ALLOW if specified)
|
||||
; 3. Gather user's groups
|
||||
; 4. Check group denies (and DENY if specified)
|
||||
; 5. Check group allows (and ALLOW if specified)
|
||||
; 6. If no aro, aco, or group information is found, DENY
|
||||
;
|
||||
; ---------------------------------------------------------------------
|
||||
|
||||
;-------------------------------------
|
||||
;Users
|
||||
;-------------------------------------
|
||||
|
||||
[username-goes-here]
|
||||
groups = group1, group2
|
||||
deny = aco1, aco2
|
||||
allow = aco3, aco4
|
||||
|
||||
;-------------------------------------
|
||||
;Groups
|
||||
;-------------------------------------
|
||||
|
||||
[groupname-goes-here]
|
||||
deny = aco5, aco6
|
||||
allow = aco7, aco8
|
124
lib/Cake/Console/Templates/skel/Config/acl.php
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?php
|
||||
/**
|
||||
* This is the PHP base ACL configuration file.
|
||||
*
|
||||
* Use it to configure access control of your CakePHP application.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Example
|
||||
* -------
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
* 1. In your application you created a User model with the following properties:
|
||||
* username, group_id, password, email, firstname, lastname and so on.
|
||||
* 2. You configured AuthComponent to authorize actions via
|
||||
* $this->Auth->authorize = array('Actions' => array('actionPath' => 'controllers/'),...)
|
||||
*
|
||||
* Now, when a user (i.e. jeff) authenticates successfully and requests a controller action (i.e. /invoices/delete)
|
||||
* that is not allowed by default (e.g. via $this->Auth->allow('edit') in the Invoices controller) then AuthComponent
|
||||
* will ask the configured ACL interface if access is granted. Under the assumptions 1. and 2. this will be
|
||||
* done via a call to Acl->check() with
|
||||
*
|
||||
* array('User' => array('username' => 'jeff', 'group_id' => 4, ...))
|
||||
*
|
||||
* as ARO and
|
||||
*
|
||||
* '/controllers/invoices/delete'
|
||||
*
|
||||
* as ACO.
|
||||
*
|
||||
* If the configured map looks like
|
||||
*
|
||||
* $config['map'] = array(
|
||||
* 'User' => 'User/username',
|
||||
* 'Role' => 'User/group_id',
|
||||
* );
|
||||
*
|
||||
* then PhpAcl will lookup if we defined a role like User/jeff. If that role is not found, PhpAcl will try to
|
||||
* find a definition for Role/4. If the definition isn't found then a default role (Role/default) will be used to
|
||||
* check rules for the given ACO. The search can be expanded by defining aliases in the alias configuration.
|
||||
* E.g. if you want to use a more readable name than Role/4 in your definitions you can define an alias like
|
||||
*
|
||||
* $config['alias'] = array(
|
||||
* 'Role/4' => 'Role/editor',
|
||||
* );
|
||||
*
|
||||
* In the roles configuration you can define roles on the lhs and inherited roles on the rhs:
|
||||
*
|
||||
* $config['roles'] = array(
|
||||
* 'Role/admin' => null,
|
||||
* 'Role/accountant' => null,
|
||||
* 'Role/editor' => null,
|
||||
* 'Role/manager' => 'Role/editor, Role/accountant',
|
||||
* 'User/jeff' => 'Role/manager',
|
||||
* );
|
||||
*
|
||||
* In this example manager inherits all rules from editor and accountant. Role/admin doesn't inherit from any role.
|
||||
* Lets define some rules:
|
||||
*
|
||||
* $config['rules'] = array(
|
||||
* 'allow' => array(
|
||||
* '*' => 'Role/admin',
|
||||
* 'controllers/users/(dashboard|profile)' => 'Role/default',
|
||||
* 'controllers/invoices/*' => 'Role/accountant',
|
||||
* 'controllers/articles/*' => 'Role/editor',
|
||||
* 'controllers/users/*' => 'Role/manager',
|
||||
* 'controllers/invoices/delete' => 'Role/manager',
|
||||
* ),
|
||||
* 'deny' => array(
|
||||
* 'controllers/invoices/delete' => 'Role/accountant, User/jeff',
|
||||
* 'controllers/articles/(delete|publish)' => 'Role/editor',
|
||||
* ),
|
||||
* );
|
||||
*
|
||||
* Ok, so as jeff inherits from Role/manager he's matched every rule that references User/jeff, Role/manager,
|
||||
* Role/editor, Role/accountant and Role/default. However, for jeff, rules for User/jeff are more specific than
|
||||
* rules for Role/manager, rules for Role/manager are more specific than rules for Role/editor and so on.
|
||||
* This is important when allow and deny rules match for a role. E.g. Role/accountant is allowed
|
||||
* controllers/invoices/* but at the same time controllers/invoices/delete is denied. But there is a more
|
||||
* specific rule defined for Role/manager which is allowed controllers/invoices/delete. However, the most specific
|
||||
* rule denies access to the delete action explicitly for User/jeff, so he'll be denied access to the resource.
|
||||
*
|
||||
* If we would remove the role definition for User/jeff, then jeff would be granted access as he would be resolved
|
||||
* to Role/manager and Role/manager has an allow rule.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The role map defines how to resolve the user record from your application
|
||||
* to the roles you defined in the roles configuration.
|
||||
*/
|
||||
$config['map'] = array(
|
||||
'User' => 'User/username',
|
||||
'Role' => 'User/group_id',
|
||||
);
|
||||
|
||||
/**
|
||||
* define aliases to map your model information to
|
||||
* the roles defined in your role configuration.
|
||||
*/
|
||||
$config['alias'] = array(
|
||||
'Role/4' => 'Role/editor',
|
||||
);
|
||||
|
||||
/**
|
||||
* role configuration
|
||||
*/
|
||||
$config['roles'] = array(
|
||||
'Role/admin' => null,
|
||||
);
|
||||
|
||||
/**
|
||||
* rule configuration
|
||||
*/
|
||||
$config['rules'] = array(
|
||||
'allow' => array(
|
||||
'*' => 'Role/admin',
|
||||
),
|
||||
'deny' => array(),
|
||||
);
|
98
lib/Cake/Console/Templates/skel/Config/bootstrap.php
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is loaded automatically by the app/webroot/index.php file after core.php
|
||||
*
|
||||
* This file should load/create any application wide configuration settings, such as
|
||||
* Caching, Logging, loading additional configuration files.
|
||||
*
|
||||
* You should also use this file to include any files that provide global functions/constants
|
||||
* that your application uses.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.10.8.2117
|
||||
*/
|
||||
|
||||
// Setup a 'default' cache configuration for use in the application.
|
||||
Cache::config('default', array('engine' => 'File'));
|
||||
|
||||
/**
|
||||
* The settings below can be used to set additional paths to models, views and controllers.
|
||||
*
|
||||
* App::build(array(
|
||||
* 'Model' => array('/path/to/models/', '/next/path/to/models/'),
|
||||
* 'Model/Behavior' => array('/path/to/behaviors/', '/next/path/to/behaviors/'),
|
||||
* 'Model/Datasource' => array('/path/to/datasources/', '/next/path/to/datasources/'),
|
||||
* 'Model/Datasource/Database' => array('/path/to/databases/', '/next/path/to/database/'),
|
||||
* 'Model/Datasource/Session' => array('/path/to/sessions/', '/next/path/to/sessions/'),
|
||||
* 'Controller' => array('/path/to/controllers/', '/next/path/to/controllers/'),
|
||||
* 'Controller/Component' => array('/path/to/components/', '/next/path/to/components/'),
|
||||
* 'Controller/Component/Auth' => array('/path/to/auths/', '/next/path/to/auths/'),
|
||||
* 'Controller/Component/Acl' => array('/path/to/acls/', '/next/path/to/acls/'),
|
||||
* 'View' => array('/path/to/views/', '/next/path/to/views/'),
|
||||
* 'View/Helper' => array('/path/to/helpers/', '/next/path/to/helpers/'),
|
||||
* 'Console' => array('/path/to/consoles/', '/next/path/to/consoles/'),
|
||||
* 'Console/Command' => array('/path/to/commands/', '/next/path/to/commands/'),
|
||||
* 'Console/Command/Task' => array('/path/to/tasks/', '/next/path/to/tasks/'),
|
||||
* 'Lib' => array('/path/to/libs/', '/next/path/to/libs/'),
|
||||
* 'Locale' => array('/path/to/locales/', '/next/path/to/locales/'),
|
||||
* 'Vendor' => array('/path/to/vendors/', '/next/path/to/vendors/'),
|
||||
* 'Plugin' => array('/path/to/plugins/', '/next/path/to/plugins/'),
|
||||
* ));
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom Inflector rules can be set to correctly pluralize or singularize table, model, controller names or whatever other
|
||||
* string is passed to the inflection functions
|
||||
*
|
||||
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
|
||||
* Uncomment one of the lines below, as you need. Make sure you read the documentation on CakePlugin to use more
|
||||
* advanced ways of loading plugins
|
||||
*
|
||||
* CakePlugin::loadAll(); // Loads all plugins at once
|
||||
* CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* You can attach event listeners to the request lifecycle as Dispatcher Filter . By default CakePHP bundles two filters:
|
||||
*
|
||||
* - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
|
||||
* - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
|
||||
*
|
||||
* Feel free to remove or add filters as you see fit for your application. A few examples:
|
||||
*
|
||||
* Configure::write('Dispatcher.filters', array(
|
||||
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
|
||||
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
|
||||
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
|
||||
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
|
||||
*
|
||||
* ));
|
||||
*/
|
||||
Configure::write('Dispatcher.filters', array(
|
||||
'AssetDispatcher',
|
||||
'CacheDispatcher'
|
||||
));
|
||||
|
||||
/**
|
||||
* Configures default file logging options
|
||||
*/
|
||||
App::uses('CakeLog', 'Log');
|
||||
CakeLog::config('debug', array(
|
||||
'engine' => 'File',
|
||||
'types' => array('notice', 'info', 'debug'),
|
||||
'file' => 'debug',
|
||||
));
|
||||
CakeLog::config('error', array(
|
||||
'engine' => 'File',
|
||||
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
|
||||
'file' => 'error',
|
||||
));
|
367
lib/Cake/Console/Templates/skel/Config/core.php
Normal file
|
@ -0,0 +1,367 @@
|
|||
<?php
|
||||
/**
|
||||
* This is core configuration file.
|
||||
*
|
||||
* Use it to configure core behavior of Cake.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* CakePHP Debug Level:
|
||||
*
|
||||
* Production Mode:
|
||||
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
|
||||
*
|
||||
* Development Mode:
|
||||
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
|
||||
* 2: As in 1, but also with full debug messages and SQL output.
|
||||
*
|
||||
* In production mode, flash messages redirect after a time interval.
|
||||
* In development mode, you need to click the flash message to continue.
|
||||
*/
|
||||
Configure::write('debug', 2);
|
||||
|
||||
/**
|
||||
* Configure the Error handler used to handle errors for your application. By default
|
||||
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
|
||||
* and log errors with CakeLog when debug = 0.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `handler` - callback - The callback to handle errors. You can set this to any callable type,
|
||||
* including anonymous functions.
|
||||
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
||||
* - `level` - integer - The level of errors you are interested in capturing.
|
||||
* - `trace` - boolean - Include stack traces for errors in log files.
|
||||
*
|
||||
* @see ErrorHandler for more information on error handling and configuration.
|
||||
*/
|
||||
Configure::write('Error', array(
|
||||
'handler' => 'ErrorHandler::handleError',
|
||||
'level' => E_ALL & ~E_DEPRECATED,
|
||||
'trace' => true
|
||||
));
|
||||
|
||||
/**
|
||||
* Configure the Exception handler used for uncaught exceptions. By default,
|
||||
* ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
|
||||
* while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
|
||||
* framework errors will be coerced into generic HTTP errors.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
|
||||
* including anonymous functions.
|
||||
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
||||
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
|
||||
* should place the file for that class in app/Lib/Error. This class needs to implement a render method.
|
||||
* - `log` - boolean - Should Exceptions be logged?
|
||||
* - `skipLog` - array - list of exceptions to skip for logging. Exceptions that
|
||||
* extend one of the listed exceptions will also be skipped for logging.
|
||||
* Example: `'skipLog' => array('NotFoundException', 'UnauthorizedException')`
|
||||
*
|
||||
* @see ErrorHandler for more information on exception handling and configuration.
|
||||
*/
|
||||
Configure::write('Exception', array(
|
||||
'handler' => 'ErrorHandler::handleException',
|
||||
'renderer' => 'ExceptionRenderer',
|
||||
'log' => true
|
||||
));
|
||||
|
||||
/**
|
||||
* Application wide charset encoding
|
||||
*/
|
||||
Configure::write('App.encoding', 'UTF-8');
|
||||
|
||||
/**
|
||||
* To configure CakePHP *not* to use mod_rewrite and to
|
||||
* use CakePHP pretty URLs, remove these .htaccess
|
||||
* files:
|
||||
*
|
||||
* /.htaccess
|
||||
* /app/.htaccess
|
||||
* /app/webroot/.htaccess
|
||||
*
|
||||
* And uncomment the App.baseUrl below. But keep in mind
|
||||
* that plugin assets such as images, CSS and JavaScript files
|
||||
* will not work without URL rewriting!
|
||||
* To work around this issue you should either symlink or copy
|
||||
* the plugin assets into you app's webroot directory. This is
|
||||
* recommended even when you are using mod_rewrite. Handling static
|
||||
* assets through the Dispatcher is incredibly inefficient and
|
||||
* included primarily as a development convenience - and
|
||||
* thus not recommended for production applications.
|
||||
*/
|
||||
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
||||
|
||||
/**
|
||||
* To configure CakePHP to use a particular domain URL
|
||||
* for any URL generation inside the application, set the following
|
||||
* configuration variable to the http(s) address to your domain. This
|
||||
* will override the automatic detection of full base URL and can be
|
||||
* useful when generating links from the CLI (e.g. sending emails)
|
||||
*/
|
||||
//Configure::write('App.fullBaseUrl', 'http://example.com');
|
||||
|
||||
/**
|
||||
* Web path to the public images directory under webroot.
|
||||
* If not set defaults to 'img/'
|
||||
*/
|
||||
//Configure::write('App.imageBaseUrl', 'img/');
|
||||
|
||||
/**
|
||||
* Web path to the CSS files directory under webroot.
|
||||
* If not set defaults to 'css/'
|
||||
*/
|
||||
//Configure::write('App.cssBaseUrl', 'css/');
|
||||
|
||||
/**
|
||||
* Web path to the js files directory under webroot.
|
||||
* If not set defaults to 'js/'
|
||||
*/
|
||||
//Configure::write('App.jsBaseUrl', 'js/');
|
||||
|
||||
/**
|
||||
* Uncomment the define below to use CakePHP prefix routes.
|
||||
*
|
||||
* The value of the define determines the names of the routes
|
||||
* and their associated controller actions:
|
||||
*
|
||||
* Set to an array of prefixes you want to use in your application. Use for
|
||||
* admin or other prefixed routes.
|
||||
*
|
||||
* Routing.prefixes = array('admin', 'manager');
|
||||
*
|
||||
* Enables:
|
||||
* `admin_index()` and `/admin/controller/index`
|
||||
* `manager_index()` and `/manager/controller/index`
|
||||
*
|
||||
*/
|
||||
//Configure::write('Routing.prefixes', array('admin'));
|
||||
|
||||
/**
|
||||
* Turn off all caching application-wide.
|
||||
*
|
||||
*/
|
||||
//Configure::write('Cache.disable', true);
|
||||
|
||||
/**
|
||||
* Enable cache checking.
|
||||
*
|
||||
* If set to true, for view caching you must still use the controller
|
||||
* public $cacheAction inside your controllers to define caching settings.
|
||||
* You can either set it controller-wide by setting public $cacheAction = true,
|
||||
* or in each action using $this->cacheAction = true.
|
||||
*
|
||||
*/
|
||||
//Configure::write('Cache.check', true);
|
||||
|
||||
/**
|
||||
* Enable cache view prefixes.
|
||||
*
|
||||
* If set it will be prepended to the cache name for view file caching. This is
|
||||
* helpful if you deploy the same application via multiple subdomains and languages,
|
||||
* for instance. Each version can then have its own view cache namespace.
|
||||
* Note: The final cache file name will then be `prefix_cachefilename`.
|
||||
*/
|
||||
//Configure::write('Cache.viewPrefix', 'prefix');
|
||||
|
||||
/**
|
||||
* Session configuration.
|
||||
*
|
||||
* Contains an array of settings to use for session configuration. The defaults key is
|
||||
* used to define a default preset to use for sessions, any settings declared here will override
|
||||
* the settings of the default config.
|
||||
*
|
||||
* ## Options
|
||||
*
|
||||
* - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
|
||||
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
|
||||
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
|
||||
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
|
||||
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
|
||||
* - `Session.defaults` - The default configuration set to use as a basis for your session.
|
||||
* There are four builtins: php, cake, cache, database.
|
||||
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables,
|
||||
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
|
||||
* to the ini array.
|
||||
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
|
||||
* sessionids that change frequently. See CakeSession::$requestCountdown.
|
||||
* - `Session.ini` - An associative array of additional ini values to set.
|
||||
*
|
||||
* The built in defaults are:
|
||||
*
|
||||
* - 'php' - Uses settings defined in your php.ini.
|
||||
* - 'cake' - Saves session files in CakePHP's /tmp directory.
|
||||
* - 'database' - Uses CakePHP's database sessions.
|
||||
* - 'cache' - Use the Cache class to save sessions.
|
||||
*
|
||||
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
|
||||
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
|
||||
*
|
||||
* To use database sessions, run the app/Config/Schema/sessions.php schema using
|
||||
* the cake shell command: cake schema create Sessions
|
||||
*
|
||||
*/
|
||||
Configure::write('Session', array(
|
||||
'defaults' => 'php'
|
||||
));
|
||||
|
||||
/**
|
||||
* A random string used in security hashing methods.
|
||||
*/
|
||||
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
||||
|
||||
/**
|
||||
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
||||
*/
|
||||
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
|
||||
|
||||
/**
|
||||
* Apply timestamps with the last modified time to static assets (js, css, images).
|
||||
* Will append a query string parameter containing the time the file was modified. This is
|
||||
* useful for invalidating browser caches.
|
||||
*
|
||||
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
|
||||
* timestamping regardless of debug value.
|
||||
*/
|
||||
//Configure::write('Asset.timestamp', true);
|
||||
|
||||
/**
|
||||
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
|
||||
* This requires a/var/cache directory to be writable by the web server for caching.
|
||||
* and /vendors/csspp/csspp.php
|
||||
*
|
||||
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
|
||||
*/
|
||||
//Configure::write('Asset.filter.css', 'css.php');
|
||||
|
||||
/**
|
||||
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
|
||||
* output, and setting the config below to the name of the script.
|
||||
*
|
||||
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JsHelper::link().
|
||||
*/
|
||||
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
|
||||
|
||||
/**
|
||||
* The class name and database used in CakePHP's
|
||||
* access control lists.
|
||||
*/
|
||||
Configure::write('Acl.classname', 'DbAcl');
|
||||
Configure::write('Acl.database', 'default');
|
||||
|
||||
/**
|
||||
* Uncomment this line and correct your server timezone to fix
|
||||
* any date & time related errors.
|
||||
*/
|
||||
//date_default_timezone_set('UTC');
|
||||
|
||||
/**
|
||||
* Cache Engine Configuration
|
||||
* Default settings provided below
|
||||
*
|
||||
* File storage engine.
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'File', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
||||
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
||||
* 'lock' => false, //[optional] use file locking
|
||||
* 'serialize' => true, //[optional]
|
||||
* 'mask' => 0664, //[optional]
|
||||
* ));
|
||||
*
|
||||
* APC (http://pecl.php.net/package/APC)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Apc', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* ));
|
||||
*
|
||||
* Xcache (http://xcache.lighttpd.net/)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Xcache', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* 'user' => 'user', //user from xcache.admin.user settings
|
||||
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
||||
* ));
|
||||
*
|
||||
* Memcache (http://www.danga.com/memcached/)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Memcache', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* 'servers' => array(
|
||||
* '127.0.0.1:11211' // localhost, default port 11211
|
||||
* ), //[optional]
|
||||
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
||||
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
||||
* ));
|
||||
*
|
||||
* Wincache (http://php.net/wincache)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Wincache', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* ));
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configure the cache handlers that CakePHP will use for internal
|
||||
* metadata like class maps, and model schema.
|
||||
*
|
||||
* By default File is used, but for improved performance you should use APC.
|
||||
*
|
||||
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
|
||||
* Please check the comments in bootstrap.php for more info on the cache engines available
|
||||
* and their settings.
|
||||
*/
|
||||
$engine = 'File';
|
||||
|
||||
// In development mode, caches should expire quickly.
|
||||
$duration = '+999 days';
|
||||
if (Configure::read('debug') > 0) {
|
||||
$duration = '+10 seconds';
|
||||
}
|
||||
|
||||
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
|
||||
$prefix = 'myapp_';
|
||||
|
||||
/**
|
||||
* Configure the cache used for general framework caching. Path information,
|
||||
* object listings, and translation cache files are stored with this configuration.
|
||||
*/
|
||||
Cache::config('_cake_core_', array(
|
||||
'engine' => $engine,
|
||||
'prefix' => $prefix . 'cake_core_',
|
||||
'path' => CACHE . 'persistent' . DS,
|
||||
'serialize' => ($engine === 'File'),
|
||||
'duration' => $duration
|
||||
));
|
||||
|
||||
/**
|
||||
* Configure the cache for model and datasource caches. This cache configuration
|
||||
* is used to store schema descriptions, and table listings in connections.
|
||||
*/
|
||||
Cache::config('_cake_model_', array(
|
||||
'engine' => $engine,
|
||||
'prefix' => $prefix . 'cake_model_',
|
||||
'path' => CACHE . 'models' . DS,
|
||||
'serialize' => ($engine === 'File'),
|
||||
'duration' => $duration
|
||||
));
|
77
lib/Cake/Console/Templates/skel/Config/database.php.default
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* Database configuration class.
|
||||
* You can specify multiple configurations for production, development and testing.
|
||||
*
|
||||
* datasource => The name of a supported datasource; valid options are as follows:
|
||||
* Database/Mysql - MySQL 4 & 5,
|
||||
* Database/Sqlite - SQLite (PHP5 only),
|
||||
* Database/Postgres - PostgreSQL 7 and higher,
|
||||
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
|
||||
*
|
||||
* You can add custom database datasources (or override existing datasources) by adding the
|
||||
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
|
||||
*
|
||||
*
|
||||
* persistent => true / false
|
||||
* Determines whether or not the database should use a persistent connection
|
||||
*
|
||||
* host =>
|
||||
* the host you connect to the database. To add a socket or port number, use 'port' => #
|
||||
*
|
||||
* prefix =>
|
||||
* Uses the given prefix for all the tables in this database. This setting can be overridden
|
||||
* on a per-table basis with the Model::$tablePrefix property.
|
||||
*
|
||||
* schema =>
|
||||
* For Postgres/Sqlserver specifies which schema you would like to use the tables in. Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
|
||||
* the connected user's default schema (typically 'dbo').
|
||||
*
|
||||
* encoding =>
|
||||
* For MySQL, Postgres specifies the character encoding to use when connecting to the
|
||||
* database. Uses database default not specified.
|
||||
*
|
||||
* unix_socket =>
|
||||
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
|
||||
*
|
||||
* settings =>
|
||||
* Array of key/value pairs, on connection it executes SET statements for each pair
|
||||
* For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
|
||||
* For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
|
||||
* For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
|
||||
*
|
||||
* flags =>
|
||||
* A key/value array of driver specific connection options.
|
||||
*/
|
||||
class DATABASE_CONFIG {
|
||||
|
||||
public $default = array(
|
||||
'datasource' => 'Database/Mysql',
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'database_name',
|
||||
'prefix' => '',
|
||||
//'encoding' => 'utf8',
|
||||
);
|
||||
|
||||
public $test = array(
|
||||
'datasource' => 'Database/Mysql',
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'test_database_name',
|
||||
'prefix' => '',
|
||||
//'encoding' => 'utf8',
|
||||
);
|
||||
}
|
83
lib/Cake/Console/Templates/skel/Config/email.php.default
Normal file
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
/**
|
||||
* This is email configuration file.
|
||||
*
|
||||
* Use it to configure email transports of Cake.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 2.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Email configuration class.
|
||||
* You can specify multiple configurations for production, development and testing.
|
||||
*
|
||||
* transport => The name of a supported transport; valid options are as follows:
|
||||
* Mail - Send using PHP mail function
|
||||
* Smtp - Send using SMTP
|
||||
* Debug - Do not send the email, just return the result
|
||||
*
|
||||
* You can add custom transports (or override existing transports) by adding the
|
||||
* appropriate file to app/Network/Email. Transports should be named 'YourTransport.php',
|
||||
* where 'Your' is the name of the transport.
|
||||
*
|
||||
* from =>
|
||||
* The origin email. See CakeEmail::from() about the valid values
|
||||
*
|
||||
*/
|
||||
class EmailConfig {
|
||||
|
||||
public $default = array(
|
||||
'transport' => 'Mail',
|
||||
'from' => 'you@localhost',
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
);
|
||||
|
||||
public $smtp = array(
|
||||
'transport' => 'Smtp',
|
||||
'from' => array('site@localhost' => 'My Site'),
|
||||
'host' => 'localhost',
|
||||
'port' => 25,
|
||||
'timeout' => 30,
|
||||
'username' => 'user',
|
||||
'password' => 'secret',
|
||||
'client' => null,
|
||||
'log' => false,
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
);
|
||||
|
||||
public $fast = array(
|
||||
'from' => 'you@localhost',
|
||||
'sender' => null,
|
||||
'to' => null,
|
||||
'cc' => null,
|
||||
'bcc' => null,
|
||||
'replyTo' => null,
|
||||
'readReceipt' => null,
|
||||
'returnPath' => null,
|
||||
'messageId' => true,
|
||||
'subject' => null,
|
||||
'message' => null,
|
||||
'headers' => null,
|
||||
'viewRender' => null,
|
||||
'template' => false,
|
||||
'layout' => false,
|
||||
'viewVars' => null,
|
||||
'attachments' => null,
|
||||
'emailFormat' => null,
|
||||
'transport' => 'Smtp',
|
||||
'host' => 'localhost',
|
||||
'port' => 25,
|
||||
'timeout' => 30,
|
||||
'username' => 'user',
|
||||
'password' => 'secret',
|
||||
'client' => null,
|
||||
'log' => true,
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
);
|
||||
|
||||
}
|
35
lib/Cake/Console/Templates/skel/Config/routes.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* Routes configuration
|
||||
*
|
||||
* In this file, you set up routes to your controllers and their actions.
|
||||
* Routes are very important mechanism that allows you to freely connect
|
||||
* different URLs to chosen controllers and their actions (functions).
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* Here, we are connecting '/' (base path) to controller called 'Pages',
|
||||
* its action called 'display', and we pass a param to select the view file
|
||||
* to use (in this case, /app/View/Pages/home.ctp)...
|
||||
*/
|
||||
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
||||
/**
|
||||
* ...and connect the rest of 'Pages' controller's URLs.
|
||||
*/
|
||||
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
||||
|
||||
/**
|
||||
* Load all plugin routes. See the CakePlugin documentation on
|
||||
* how to customize the loading of plugin routes.
|
||||
*/
|
||||
CakePlugin::routes();
|
||||
|
||||
/**
|
||||
* Load the CakePHP default routes. Only remove this if you do not want to use
|
||||
* the built-in default routes.
|
||||
*/
|
||||
require CAKE . 'Config' . DS . 'routes.php';
|
21
lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* AppShell file
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since CakePHP(tm) v 2.0
|
||||
*/
|
||||
|
||||
App::uses('Shell', 'Console');
|
||||
|
||||
/**
|
||||
* Application Shell
|
||||
*
|
||||
* Add your application-wide methods in the class below, your shells
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.Console.Command
|
||||
*/
|
||||
class AppShell extends Shell {
|
||||
|
||||
}
|
0
lib/Cake/Console/Templates/skel/Console/Templates/empty
Normal file
41
lib/Cake/Console/Templates/skel/Console/cake
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
################################################################################
|
||||
#
|
||||
# Bake is a shell script for running CakePHP bake script
|
||||
#
|
||||
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
#
|
||||
# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
# @link http://cakephp.org CakePHP(tm) Project
|
||||
# @package app.Console
|
||||
# @since CakePHP(tm) v 1.2.0.5012
|
||||
# @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Canonicalize by following every symlink of the given name recursively
|
||||
canonicalize() {
|
||||
NAME="$1"
|
||||
if [ -f "$NAME" ]
|
||||
then
|
||||
DIR=$(dirname -- "$NAME")
|
||||
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
|
||||
fi
|
||||
while [ -h "$NAME" ]; do
|
||||
DIR=$(dirname -- "$NAME")
|
||||
SYM=$(readlink "$NAME")
|
||||
NAME=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
|
||||
done
|
||||
echo "$NAME"
|
||||
}
|
||||
|
||||
CONSOLE=$(dirname -- "$(canonicalize "$0")")
|
||||
APP=$(dirname "$CONSOLE")
|
||||
|
||||
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
|
||||
exit
|
30
lib/Cake/Console/Templates/skel/Console/cake.bat
Normal file
|
@ -0,0 +1,30 @@
|
|||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::
|
||||
:: Bake is a shell script for running CakePHP bake script
|
||||
::
|
||||
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
::
|
||||
:: Licensed under The MIT License
|
||||
:: Redistributions of files must retain the above copyright notice.
|
||||
::
|
||||
:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
:: @link http://cakephp.org CakePHP(tm) Project
|
||||
:: @package app.Console
|
||||
:: @since CakePHP(tm) v 2.0
|
||||
::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
:: In order for this script to work as intended, the cake\console\ folder must be in your PATH
|
||||
|
||||
@echo.
|
||||
@echo off
|
||||
|
||||
SET app=%0
|
||||
SET lib=%~dp0
|
||||
|
||||
php -q "%lib%cake.php" -working "%CD% " %*
|
||||
|
||||
echo.
|
||||
|
||||
exit /B %ERRORLEVEL%
|
48
lib/Cake/Console/Templates/skel/Console/cake.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/php -q
|
||||
<?php
|
||||
/**
|
||||
* Command-line code generation utility to automate programmer chores.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Console
|
||||
* @since CakePHP(tm) v 2.0
|
||||
*/
|
||||
|
||||
if (!defined('DS')) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
|
||||
|
||||
if (function_exists('ini_set')) {
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
$appDir = basename(dirname(dirname(__FILE__)));
|
||||
$install = $root . DS . 'lib';
|
||||
$composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
|
||||
|
||||
// the following lines differ from its sibling
|
||||
// /app/Console/cake.php
|
||||
if (file_exists($composerInstall . DS . $dispatcher)) {
|
||||
$install = $composerInstall;
|
||||
} elseif (!file_exists($install . DS . $dispatcher)) {
|
||||
$install = $root . PATH_SEPARATOR . __CAKE_PATH__;
|
||||
}
|
||||
|
||||
ini_set('include_path', $install . PATH_SEPARATOR . ini_get('include_path'));
|
||||
unset($root, $appDir, $install, $composerInstall);
|
||||
}
|
||||
|
||||
if (!include $dispatcher) {
|
||||
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
|
||||
}
|
||||
unset($dispatcher);
|
||||
|
||||
return ShellDispatcher::run($argv);
|
25
lib/Cake/Console/Templates/skel/Controller/AppController.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/**
|
||||
* Application level Controller
|
||||
*
|
||||
* This file is application-wide controller file. You can put all
|
||||
* application-wide controller-related methods here.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Controller
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
App::uses('Controller', 'Controller');
|
||||
|
||||
/**
|
||||
* Application Controller
|
||||
*
|
||||
* Add your application-wide methods in the class below, your controllers
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.Controller
|
||||
* @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
|
||||
*/
|
||||
class AppController extends Controller {
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
/**
|
||||
* Static content controller.
|
||||
*
|
||||
* This file will render views from views/pages/
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Controller
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
/**
|
||||
* Static content controller
|
||||
*
|
||||
* Override this controller by placing a copy in controllers directory of an application
|
||||
*
|
||||
* @package app.Controller
|
||||
* @link http://book.cakephp.org/2.0/en/controllers/pages-controller.html
|
||||
*/
|
||||
class PagesController extends AppController {
|
||||
|
||||
/**
|
||||
* This controller does not use a model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $uses = array();
|
||||
|
||||
/**
|
||||
* Displays a view
|
||||
*
|
||||
* @return void
|
||||
* @throws NotFoundException When the view file could not be found
|
||||
* or MissingViewException in debug mode.
|
||||
*/
|
||||
public function display() {
|
||||
$path = func_get_args();
|
||||
|
||||
$count = count($path);
|
||||
if (!$count) {
|
||||
return $this->redirect('/');
|
||||
}
|
||||
$page = $subpage = $title_for_layout = null;
|
||||
|
||||
if (!empty($path[0])) {
|
||||
$page = $path[0];
|
||||
}
|
||||
if (!empty($path[1])) {
|
||||
$subpage = $path[1];
|
||||
}
|
||||
if (!empty($path[$count - 1])) {
|
||||
$title_for_layout = Inflector::humanize($path[$count - 1]);
|
||||
}
|
||||
$this->set(compact('page', 'subpage', 'title_for_layout'));
|
||||
|
||||
try {
|
||||
$this->render(implode('/', $path));
|
||||
} catch (MissingViewException $e) {
|
||||
if (Configure::read('debug')) {
|
||||
throw $e;
|
||||
}
|
||||
throw new NotFoundException();
|
||||
}
|
||||
}
|
||||
}
|
0
lib/Cake/Console/Templates/skel/Lib/empty
Normal file
24
lib/Cake/Console/Templates/skel/Model/AppModel.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* Application model for Cake.
|
||||
*
|
||||
* This file is application-wide model file. You can put all
|
||||
* application-wide model-related methods here.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Model
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
App::uses('Model', 'Model');
|
||||
|
||||
/**
|
||||
* Application model for Cake.
|
||||
*
|
||||
* Add your application-wide methods in the class below, your models
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.Model
|
||||
*/
|
||||
class AppModel extends Model {
|
||||
}
|
0
lib/Cake/Console/Templates/skel/Model/Behavior/empty
Normal file
0
lib/Cake/Console/Templates/skel/Model/Datasource/empty
Normal file
0
lib/Cake/Console/Templates/skel/Plugin/empty
Normal file
31
lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* AllTests file
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Test.Case
|
||||
* @since CakePHP(tm) v 2.5
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
class AllTestsTest extends CakeTestSuite {
|
||||
|
||||
/**
|
||||
* Get the suite object.
|
||||
*
|
||||
* @return CakeTestSuite Suite class instance.
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All application tests');
|
||||
$suite->addTestDirectoryRecursive(TESTS . 'Case');
|
||||
return $suite;
|
||||
}
|
||||
}
|
0
lib/Cake/Console/Templates/skel/Test/Fixture/empty
Normal file
0
lib/Cake/Console/Templates/skel/Vendor/empty
vendored
Normal file
0
lib/Cake/Console/Templates/skel/View/Elements/empty
Normal file
23
lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Emails.html
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
$content = explode("\n", $content);
|
||||
|
||||
foreach ($content as $line):
|
||||
echo '<p> ' . $line . "</p>\n";
|
||||
endforeach;
|
||||
?>
|
17
lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Emails.text
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<?php echo $content; ?>
|
20
lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Errors
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
?>
|
||||
<h2><?php echo $message; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php printf(
|
||||
__d('cake', 'The requested address %s was not found on this server.'),
|
||||
"<strong>'{$url}'</strong>"
|
||||
); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
?>
|
17
lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Errors
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
?>
|
||||
<h2><?php echo $message; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
?>
|
24
lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* Application level View Helper
|
||||
*
|
||||
* This file is application-wide helper file. You can put all
|
||||
* application-wide helper-related methods here.
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Helper
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
App::uses('Helper', 'View');
|
||||
|
||||
/**
|
||||
* Application helper
|
||||
*
|
||||
* Add your application-wide methods in the class below, your helpers
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.View.Helper
|
||||
*/
|
||||
class AppHelper extends Helper {
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Layouts.Email.html
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->fetch('title'); ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $this->fetch('content'); ?>
|
||||
|
||||
<p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Layouts.Email.text
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<?php echo $this->fetch('content'); ?>
|
||||
|
||||
This email was sent using the CakePHP Framework, http://cakephp.org.
|
8
lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Layouts
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
?>
|
||||
<?php echo $this->fetch('content'); ?>
|
50
lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Layouts
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
|
||||
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php echo $this->Html->charset(); ?>
|
||||
<title>
|
||||
<?php echo $cakeDescription ?>:
|
||||
<?php echo $this->fetch('title'); ?>
|
||||
</title>
|
||||
<?php
|
||||
echo $this->Html->meta('icon');
|
||||
|
||||
echo $this->Html->css('cake.generic');
|
||||
|
||||
echo $this->fetch('meta');
|
||||
echo $this->fetch('css');
|
||||
echo $this->fetch('script');
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
<?php echo $this->Session->flash(); ?>
|
||||
|
||||
<?php echo $this->fetch('content'); ?>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<?php echo $this->Html->link(
|
||||
$this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
|
||||
'http://www.cakephp.org/',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->element('sql_dump'); ?>
|
||||
</body>
|
||||
</html>
|
50
lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Layouts
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
|
||||
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php echo $this->Html->charset(); ?>
|
||||
<title>
|
||||
<?php echo $cakeDescription ?>:
|
||||
<?php echo $this->fetch('title'); ?>
|
||||
</title>
|
||||
<?php
|
||||
echo $this->Html->meta('icon');
|
||||
|
||||
echo $this->Html->css('cake.generic');
|
||||
|
||||
echo $this->fetch('meta');
|
||||
echo $this->fetch('css');
|
||||
echo $this->fetch('script');
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
<?php echo $this->Session->flash(); ?>
|
||||
|
||||
<?php echo $this->fetch('content'); ?>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<?php echo $this->Html->link(
|
||||
$this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
|
||||
'http://www.cakephp.org/',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->element('sql_dump'); ?>
|
||||
</body>
|
||||
</html>
|
26
lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Layouts
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php echo $this->Html->charset(); ?>
|
||||
<title><?php echo $page_title; ?></title>
|
||||
|
||||
<?php if (!Configure::read('debug')): ?>
|
||||
<meta http-equiv="Refresh" content="<?php echo $pause; ?>;url=<?php echo $url; ?>"/>
|
||||
<?php endif ?>
|
||||
<style><!--
|
||||
P { text-align:center; font:bold 1.1em sans-serif }
|
||||
A { color:#444; text-decoration:none }
|
||||
A:HOVER { text-decoration: underline; color:#44E }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="<?php echo $url; ?>"><?php echo $message; ?></a></p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,2 @@
|
|||
<?php echo $scripts_for_layout; ?>
|
||||
<script type="text/javascript"><?php echo $this->fetch('content'); ?></script>
|
13
lib/Cake/Console/Templates/skel/View/Layouts/rss/default.ctp
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
if (!isset($channel)):
|
||||
$channel = array();
|
||||
endif;
|
||||
if (!isset($channel['title'])):
|
||||
$channel['title'] = $this->fetch('title');
|
||||
endif;
|
||||
|
||||
echo $this->Rss->document(
|
||||
$this->Rss->channel(
|
||||
array(), $channel, $this->fetch('content')
|
||||
)
|
||||
);
|
|
@ -0,0 +1 @@
|
|||
<?php echo $this->fetch('content'); ?>
|
231
lib/Cake/Console/Templates/skel/View/Pages/home.ctp
Normal file
|
@ -0,0 +1,231 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Pages
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
|
||||
if (!Configure::read('debug')):
|
||||
throw new NotFoundException();
|
||||
endif;
|
||||
|
||||
App::uses('Debugger', 'Utility');
|
||||
?>
|
||||
<h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
|
||||
<p>
|
||||
<a href="http://cakephp.org/changelogs/<?php echo Configure::version(); ?>"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
Debugger::checkSecurityKeys();
|
||||
endif;
|
||||
?>
|
||||
<?php
|
||||
if (file_exists(WWW_ROOT . 'css' . DS . 'cake.generic.css')):
|
||||
?>
|
||||
<p id="url-rewriting-warning" style="background-color:#e32; color:#fff;">
|
||||
<?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?>
|
||||
1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/url-rewriting.html" style="color:#fff;">Help me configure it</a>
|
||||
2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a>
|
||||
</p>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
if (version_compare(PHP_VERSION, '5.2.8', '>=')):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
if (is_writable(TMP)):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Your tmp directory is writable.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'Your tmp directory is NOT writable.');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
$settings = Cache::settings();
|
||||
if (!empty($settings)):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>'. $settings['engine'] . 'Engine</em>', 'APP/Config/core.php');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
$filePresent = null;
|
||||
if (file_exists(APP . 'Config' . DS . 'database.php')):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Your database configuration file is present.');
|
||||
$filePresent = true;
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'Your database configuration file is NOT present.');
|
||||
echo '<br/>';
|
||||
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if (isset($filePresent)):
|
||||
App::uses('ConnectionManager', 'Model');
|
||||
try {
|
||||
$connected = ConnectionManager::getDataSource('default');
|
||||
} catch (Exception $connectionError) {
|
||||
$connected = false;
|
||||
$errorMsg = $connectionError->getMessage();
|
||||
if (method_exists($connectionError, 'getAttributes')):
|
||||
$attributes = $connectionError->getAttributes();
|
||||
if (isset($errorMsg['message'])):
|
||||
$errorMsg .= '<br />' . $attributes['message'];
|
||||
endif;
|
||||
endif;
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
if ($connected && $connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'CakePHP is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'CakePHP is NOT able to connect to the database.');
|
||||
echo '<br /><br />';
|
||||
echo $errorMsg;
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
App::uses('Validation', 'Utility');
|
||||
if (!Validation::alphaNumeric('cakephp')):
|
||||
echo '<p><span class="notice">';
|
||||
echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
|
||||
echo '<br/>';
|
||||
echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring');
|
||||
echo '</span></p>';
|
||||
endif;
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
if (CakePlugin::loaded('DebugKit')):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'DebugKit plugin is present');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'DebugKit is not installed. It will help you inspect and debug different aspects of your application.');
|
||||
echo '<br/>';
|
||||
echo __d('cake_dev', 'You can install it from %s', $this->Html->link('GitHub', 'https://github.com/cakephp/debug_kit'));
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo __d('cake_dev', 'To change the content of this page, edit: %s.<br />
|
||||
To change its layout, edit: %s.<br />
|
||||
You can also add some CSS styles for your pages at: %s.',
|
||||
'APP/View/Pages/home.ctp', 'APP/View/Layouts/default.ctp', 'APP/webroot/css');
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php echo __d('cake_dev', 'Getting Started'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Html->link(
|
||||
sprintf('<strong>%s</strong> %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 2.0 Docs')),
|
||||
'http://book.cakephp.org/2.0/en/',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Html->link(
|
||||
__d('cake_dev', 'The 15 min Blog Tutorial'),
|
||||
'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html',
|
||||
array('target' => '_blank', 'escape' => false)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<h3><?php echo __d('cake_dev', 'Official Plugins'); ?></h3>
|
||||
<p>
|
||||
<ul>
|
||||
<li>
|
||||
<?php echo $this->Html->link('DebugKit', 'https://github.com/cakephp/debug_kit') ?>:
|
||||
<?php echo __d('cake_dev', 'provides a debugging toolbar and enhanced debugging tools for CakePHP applications.'); ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php echo $this->Html->link('Localized', 'https://github.com/cakephp/localized') ?>:
|
||||
<?php echo __d('cake_dev', 'contains various localized validation classes and translations for specific countries'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<h3><?php echo __d('cake_dev', 'More about CakePHP'); ?></h3>
|
||||
<p>
|
||||
<?php echo __d('cake_dev', 'CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __d('cake_dev', 'Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://cakephp.org">CakePHP</a>
|
||||
<ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li>
|
||||
<li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li>
|
||||
<li><a href="http://api.cakephp.org"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Quick API Reference'); ?></li></ul></li>
|
||||
<li><a href="http://bakery.cakephp.org"><?php echo __d('cake_dev', 'The Bakery'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Everything CakePHP'); ?></li></ul></li>
|
||||
<li><a href="http://plugins.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Plugins'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'A comprehensive list of all CakePHP plugins created by the community'); ?></li></ul></li>
|
||||
<li><a href="http://community.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Community Center'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Everything related to the CakePHP community in one place'); ?></li></ul></li>
|
||||
<li><a href="https://groups.google.com/group/cake-php"><?php echo __d('cake_dev', 'CakePHP Google Group'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Community mailing list'); ?></li></ul></li>
|
||||
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Live chat about CakePHP'); ?></li></ul></li>
|
||||
<li><a href="https://github.com/cakephp/"><?php echo __d('cake_dev', 'CakePHP Code'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Find the CakePHP code on GitHub and contribute to the framework'); ?></li></ul></li>
|
||||
<li><a href="https://github.com/cakephp/cakephp/issues"><?php echo __d('cake_dev', 'CakePHP Issues'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'CakePHP Issues'); ?></li></ul></li>
|
||||
<li><a href="https://github.com/cakephp/cakephp/wiki#roadmaps"><?php echo __d('cake_dev', 'CakePHP Roadmaps'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'CakePHP Roadmaps'); ?></li></ul></li>
|
||||
<li><a href="http://training.cakephp.org"><?php echo __d('cake_dev', 'Training'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Join a live session and get skilled with the framework'); ?></li></ul></li>
|
||||
<li><a href="http://cakefest.org"><?php echo __d('cake_dev', 'CakeFest'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Don\'t miss our annual CakePHP conference'); ?></li></ul></li>
|
||||
<li><a href="http://cakefoundation.org"><?php echo __d('cake_dev', 'Cake Software Foundation'); ?> </a>
|
||||
<ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li>
|
||||
</ul>
|
0
lib/Cake/Console/Templates/skel/View/Scaffolds/empty
Normal file
8
lib/Cake/Console/Templates/skel/index.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
*/
|
||||
|
||||
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
|
6
lib/Cake/Console/Templates/skel/webroot/.htaccess
Normal file
|
@ -0,0 +1,6 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
742
lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
Normal file
|
@ -0,0 +1,742 @@
|
|||
@charset "utf-8";
|
||||
/**
|
||||
*
|
||||
* Generic CSS for CakePHP
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.webroot.css
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
/** General Style Info **/
|
||||
body {
|
||||
background: #003d4c;
|
||||
color: #fff;
|
||||
font-family:'lucida grande',verdana,helvetica,arial,sans-serif;
|
||||
font-size:90%;
|
||||
margin: 0;
|
||||
}
|
||||
a {
|
||||
color: #003d4c;
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #367889;
|
||||
text-decoration:none;
|
||||
}
|
||||
a img {
|
||||
border:none;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
font-weight: normal;
|
||||
margin-bottom:0.5em;
|
||||
}
|
||||
h1 {
|
||||
background:#fff;
|
||||
color: #003d4c;
|
||||
font-size: 100%;
|
||||
}
|
||||
h2 {
|
||||
background:#fff;
|
||||
color: #e32;
|
||||
font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif;
|
||||
font-size: 190%;
|
||||
}
|
||||
h3 {
|
||||
color: #2c6877;
|
||||
font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif;
|
||||
font-size: 165%;
|
||||
}
|
||||
h4 {
|
||||
color: #993;
|
||||
font-weight: normal;
|
||||
}
|
||||
ul, li {
|
||||
margin: 0 12px;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
|
||||
/** Layout **/
|
||||
#container {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#header{
|
||||
padding: 10px 20px;
|
||||
}
|
||||
#header h1 {
|
||||
line-height:20px;
|
||||
background: #003d4c url('../img/cake.icon.png') no-repeat left;
|
||||
color: #fff;
|
||||
padding: 0px 30px;
|
||||
}
|
||||
#header h1 a {
|
||||
color: #fff;
|
||||
background: #003d4c;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
#header h1 a:hover {
|
||||
color: #fff;
|
||||
background: #003d4c;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#content{
|
||||
background: #fff;
|
||||
clear: both;
|
||||
color: #333;
|
||||
padding: 10px 20px 40px 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
#footer {
|
||||
clear: both;
|
||||
padding: 6px 10px;
|
||||
text-align: right;
|
||||
}
|
||||
#header a, #footer a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/** containers **/
|
||||
div.form,
|
||||
div.index,
|
||||
div.view {
|
||||
float:right;
|
||||
width:76%;
|
||||
border-left:1px solid #666;
|
||||
padding:10px 2%;
|
||||
}
|
||||
div.actions {
|
||||
float:left;
|
||||
width:16%;
|
||||
padding:10px 1.5%;
|
||||
}
|
||||
div.actions h3 {
|
||||
padding-top:0;
|
||||
color:#777;
|
||||
}
|
||||
|
||||
|
||||
/** Tables **/
|
||||
table {
|
||||
border-right:0;
|
||||
clear: both;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
th {
|
||||
border:0;
|
||||
border-bottom:2px solid #555;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
}
|
||||
th a {
|
||||
display: block;
|
||||
padding: 2px 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
th a.asc:after {
|
||||
content: ' ⇣';
|
||||
}
|
||||
th a.desc:after {
|
||||
content: ' ⇡';
|
||||
}
|
||||
table tr td {
|
||||
padding: 6px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
border-bottom:1px solid #ddd;
|
||||
}
|
||||
table tr:nth-child(even) {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
td.actions {
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
table td.actions a {
|
||||
margin: 0px 6px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
|
||||
/* SQL log */
|
||||
.cake-sql-log {
|
||||
background: #fff;
|
||||
}
|
||||
.cake-sql-log td {
|
||||
padding: 4px 8px;
|
||||
text-align: left;
|
||||
font-family: Monaco, Consolas, "Courier New", monospaced;
|
||||
}
|
||||
.cake-sql-log caption {
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
/** Paging **/
|
||||
.paging {
|
||||
background:#fff;
|
||||
color: #ccc;
|
||||
margin-top: 1em;
|
||||
clear:both;
|
||||
}
|
||||
.paging .current,
|
||||
.paging .disabled,
|
||||
.paging a {
|
||||
text-decoration: none;
|
||||
padding: 5px 8px;
|
||||
display: inline-block
|
||||
}
|
||||
.paging > span {
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
border-left: 0;
|
||||
}
|
||||
.paging > span:hover {
|
||||
background: #efefef;
|
||||
}
|
||||
.paging .prev {
|
||||
border-left: 1px solid #ccc;
|
||||
-moz-border-radius: 4px 0 0 4px;
|
||||
-webkit-border-radius: 4px 0 0 4px;
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
.paging .next {
|
||||
-moz-border-radius: 0 4px 4px 0;
|
||||
-webkit-border-radius: 0 4px 4px 0;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
.paging .disabled {
|
||||
color: #ddd;
|
||||
}
|
||||
.paging .disabled:hover {
|
||||
background: transparent;
|
||||
}
|
||||
.paging .current {
|
||||
background: #efefef;
|
||||
color: #c73e14;
|
||||
}
|
||||
|
||||
/** Scaffold View **/
|
||||
dl {
|
||||
line-height: 2em;
|
||||
margin: 0em 0em;
|
||||
width: 60%;
|
||||
}
|
||||
dl dd:nth-child(4n+2),
|
||||
dl dt:nth-child(4n+1) {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
padding-left: 4px;
|
||||
vertical-align: top;
|
||||
width: 10em;
|
||||
}
|
||||
dd {
|
||||
margin-left: 10em;
|
||||
margin-top: -2em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/** Forms **/
|
||||
form {
|
||||
clear: both;
|
||||
margin-right: 20px;
|
||||
padding: 0;
|
||||
width: 95%;
|
||||
}
|
||||
fieldset {
|
||||
border: none;
|
||||
margin-bottom: 1em;
|
||||
padding: 16px 10px;
|
||||
}
|
||||
fieldset legend {
|
||||
color: #e32;
|
||||
font-size: 160%;
|
||||
font-weight: bold;
|
||||
}
|
||||
fieldset fieldset {
|
||||
margin-top: 0;
|
||||
padding: 10px 0 0;
|
||||
}
|
||||
fieldset fieldset legend {
|
||||
font-size: 120%;
|
||||
font-weight: normal;
|
||||
}
|
||||
fieldset fieldset div {
|
||||
clear: left;
|
||||
margin: 0 20px;
|
||||
}
|
||||
form div {
|
||||
clear: both;
|
||||
margin-bottom: 1em;
|
||||
padding: .5em;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
form .input {
|
||||
color: #444;
|
||||
}
|
||||
form .required {
|
||||
font-weight: bold;
|
||||
}
|
||||
form .required label:after {
|
||||
color: #e32;
|
||||
content: '*';
|
||||
display:inline;
|
||||
}
|
||||
form div.submit {
|
||||
border: 0;
|
||||
clear: both;
|
||||
margin-top: 10px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
font-size: 110%;
|
||||
margin-bottom:3px;
|
||||
}
|
||||
input, textarea {
|
||||
clear: both;
|
||||
font-size: 140%;
|
||||
font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif;
|
||||
padding: 1%;
|
||||
width:98%;
|
||||
}
|
||||
select {
|
||||
clear: both;
|
||||
font-size: 120%;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
select[multiple=multiple] {
|
||||
width: 100%;
|
||||
}
|
||||
option {
|
||||
font-size: 120%;
|
||||
padding: 0 3px;
|
||||
}
|
||||
input[type=checkbox] {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin: 0px 6px 7px 2px;
|
||||
width: auto;
|
||||
}
|
||||
div.checkbox label {
|
||||
display: inline;
|
||||
}
|
||||
input[type=radio] {
|
||||
float:left;
|
||||
width:auto;
|
||||
margin: 6px 0;
|
||||
padding: 0;
|
||||
line-height: 26px;
|
||||
}
|
||||
.radio label {
|
||||
margin: 0 0 6px 20px;
|
||||
line-height: 26px;
|
||||
}
|
||||
input[type=submit] {
|
||||
display: inline;
|
||||
font-size: 110%;
|
||||
width: auto;
|
||||
}
|
||||
form .submit input[type=submit] {
|
||||
background:#62af56;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||
border-color: #2d6324;
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
form .submit input[type=submit]:hover {
|
||||
background: #5BA150;
|
||||
}
|
||||
/* Form errors */
|
||||
form .error {
|
||||
background: #FFDACC;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
font-weight: normal;
|
||||
}
|
||||
form .error-message {
|
||||
-moz-border-radius: none;
|
||||
-webkit-border-radius: none;
|
||||
border-radius: none;
|
||||
border: none;
|
||||
background: none;
|
||||
margin: 0;
|
||||
padding-left: 4px;
|
||||
padding-right: 0;
|
||||
}
|
||||
form .error,
|
||||
form .error-message {
|
||||
color: #9E2424;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
-ms-box-shadow: none;
|
||||
-o-box-shadow: none;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/** Notices and Errors **/
|
||||
.message {
|
||||
clear: both;
|
||||
color: #fff;
|
||||
font-size: 140%;
|
||||
font-weight: bold;
|
||||
margin: 0 0 1em 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.success,
|
||||
.message,
|
||||
.cake-error,
|
||||
.cake-debug,
|
||||
.notice,
|
||||
p.error,
|
||||
.error-message {
|
||||
background: #ffcc00;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -ms-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800));
|
||||
background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -o-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: linear-gradient(top, #ffcc00, #E6B800);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
margin-bottom: 18px;
|
||||
padding: 7px 14px;
|
||||
color: #404040;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
.success,
|
||||
.message,
|
||||
.cake-error,
|
||||
p.error,
|
||||
.error-message {
|
||||
clear: both;
|
||||
color: #fff;
|
||||
background: #c43c35;
|
||||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
|
||||
background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: linear-gradient(top, #ee5f5b, #c43c35);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.success {
|
||||
clear: both;
|
||||
color: #fff;
|
||||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
background: #3B8230;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -ms-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -o-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: linear-gradient(top, #76BF6B, #3B8230);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
p.error {
|
||||
font-family: Monaco, Consolas, Courier, monospace;
|
||||
font-size: 120%;
|
||||
padding: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
p.error em {
|
||||
font-weight: normal;
|
||||
line-height: 140%;
|
||||
}
|
||||
.notice {
|
||||
color: #000;
|
||||
display: block;
|
||||
font-size: 120%;
|
||||
padding: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.success {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/** Actions **/
|
||||
.actions ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.actions li {
|
||||
margin:0 0 0.5em 0;
|
||||
list-style-type: none;
|
||||
white-space: nowrap;
|
||||
padding: 0;
|
||||
}
|
||||
.actions ul li a {
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Buttons and button links */
|
||||
input[type=submit],
|
||||
.actions ul li a,
|
||||
.actions a {
|
||||
font-weight:normal;
|
||||
padding: 4px 8px;
|
||||
background: #dcdcdc;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc));
|
||||
background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -o-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: linear-gradient(top, #fefefe, #dcdcdc);
|
||||
color:#333;
|
||||
border:1px solid #bbb;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
text-decoration: none;
|
||||
text-shadow: #fff 0px 1px 0px;
|
||||
min-width: 0;
|
||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2);
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.actions ul li a:hover,
|
||||
.actions a:hover {
|
||||
background: #ededed;
|
||||
border-color: #acacac;
|
||||
text-decoration: none;
|
||||
}
|
||||
input[type=submit]:active,
|
||||
.actions ul li a:active,
|
||||
.actions a:active {
|
||||
background: #eee;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#eee));
|
||||
background-image: -webkit-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -moz-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -ms-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -o-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: linear-gradient(top, #dfdfdf, #eee);
|
||||
text-shadow: #eee 0px 1px 0px;
|
||||
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
-webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
border-color: #aaa;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/** Related **/
|
||||
.related {
|
||||
clear: both;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/** Debugging **/
|
||||
pre {
|
||||
color: #000;
|
||||
background: #f0f0f0;
|
||||
padding: 15px;
|
||||
-moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
-webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.cake-debug-output {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
}
|
||||
.cake-debug-output > span {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
padding: 5px 6px;
|
||||
color: #000;
|
||||
display: block;
|
||||
float: left;
|
||||
-moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.cake-debug,
|
||||
.cake-error {
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
clear: both;
|
||||
}
|
||||
.cake-error > a {
|
||||
text-shadow: none;
|
||||
}
|
||||
.cake-error {
|
||||
white-space: normal;
|
||||
}
|
||||
.cake-stack-trace {
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
color: #333;
|
||||
margin: 10px 0 5px 0;
|
||||
padding: 10px 10px 0 10px;
|
||||
font-size: 120%;
|
||||
line-height: 140%;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.cake-stack-trace a {
|
||||
text-shadow: none;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
padding: 5px;
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
margin: 0px 4px 10px 2px;
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
-moz-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
|
||||
-webkit-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
|
||||
box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.cake-code-dump pre {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
}
|
||||
.cake-context {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.cake-stack-trace pre {
|
||||
color: #000;
|
||||
background-color: #F0F0F0;
|
||||
margin: 0px 0 10px 0;
|
||||
padding: 1em;
|
||||
overflow: auto;
|
||||
text-shadow: none;
|
||||
}
|
||||
.cake-stack-trace li {
|
||||
padding: 10px 5px 0px;
|
||||
margin: 0 0 4px 0;
|
||||
font-family: monospace;
|
||||
border: 1px solid #bbb;
|
||||
-moz-border-radius: 4px;
|
||||
-wekbkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background: #dcdcdc;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc));
|
||||
background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -o-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: linear-gradient(top, #fefefe, #dcdcdc);
|
||||
}
|
||||
/* excerpt */
|
||||
.cake-code-dump pre,
|
||||
.cake-code-dump pre code {
|
||||
clear: both;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
margin: 4px 2px;
|
||||
padding: 4px;
|
||||
overflow: auto;
|
||||
}
|
||||
.cake-code-dump .code-highlight {
|
||||
display: block;
|
||||
background-color: rgba(255, 255, 0, 0.5);
|
||||
}
|
||||
.code-coverage-results div.code-line {
|
||||
padding-left:5px;
|
||||
display:block;
|
||||
margin-left:10px;
|
||||
}
|
||||
.code-coverage-results div.uncovered span.content {
|
||||
background:#ecc;
|
||||
}
|
||||
.code-coverage-results div.covered span.content {
|
||||
background:#cec;
|
||||
}
|
||||
.code-coverage-results div.ignored span.content {
|
||||
color:#aaa;
|
||||
}
|
||||
.code-coverage-results span.line-num {
|
||||
color:#666;
|
||||
display:block;
|
||||
float:left;
|
||||
width:20px;
|
||||
text-align:right;
|
||||
margin-right:5px;
|
||||
}
|
||||
.code-coverage-results span.line-num strong {
|
||||
color:#666;
|
||||
}
|
||||
.code-coverage-results div.start {
|
||||
border:1px solid #aaa;
|
||||
border-width:1px 1px 0px 1px;
|
||||
margin-top:30px;
|
||||
padding-top:5px;
|
||||
}
|
||||
.code-coverage-results div.end {
|
||||
border:1px solid #aaa;
|
||||
border-width:0px 1px 1px 1px;
|
||||
margin-bottom:30px;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
.code-coverage-results div.realstart {
|
||||
margin-top:0px;
|
||||
}
|
||||
.code-coverage-results p.note {
|
||||
color:#bbb;
|
||||
padding:5px;
|
||||
margin:5px 0 10px;
|
||||
font-size:10px;
|
||||
}
|
||||
.code-coverage-results span.result-bad {
|
||||
color: #a00;
|
||||
}
|
||||
.code-coverage-results span.result-ok {
|
||||
color: #fa0;
|
||||
}
|
||||
.code-coverage-results span.result-good {
|
||||
color: #0a0;
|
||||
}
|
||||
|
||||
/** Elements **/
|
||||
#url-rewriting-warning {
|
||||
display:none;
|
||||
}
|
BIN
lib/Cake/Console/Templates/skel/webroot/favicon.ico
Normal file
After Width: | Height: | Size: 372 B |
0
lib/Cake/Console/Templates/skel/webroot/files/empty
Normal file
BIN
lib/Cake/Console/Templates/skel/webroot/img/cake.icon.png
Normal file
After Width: | Height: | Size: 943 B |
BIN
lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif
Normal file
After Width: | Height: | Size: 201 B |
BIN
lib/Cake/Console/Templates/skel/webroot/img/test-error-icon.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
lib/Cake/Console/Templates/skel/webroot/img/test-fail-icon.png
Normal file
After Width: | Height: | Size: 496 B |
BIN
lib/Cake/Console/Templates/skel/webroot/img/test-pass-icon.png
Normal file
After Width: | Height: | Size: 783 B |
BIN
lib/Cake/Console/Templates/skel/webroot/img/test-skip-icon.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
99
lib/Cake/Console/Templates/skel/webroot/index.php
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
/**
|
||||
* Index
|
||||
*
|
||||
* The Front Controller for handling every request
|
||||
*
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.webroot
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* Use the DS to separate the directories in other defines
|
||||
*/
|
||||
if (!defined('DS')) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* These defines should only be edited if you have CakePHP installed in
|
||||
* a directory layout other than the way it is distributed.
|
||||
* When using custom settings be sure to use the DS and do not add a trailing DS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The full path to the directory which holds "app", WITHOUT a trailing DS.
|
||||
*
|
||||
*/
|
||||
if (!defined('ROOT')) {
|
||||
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual directory name for the "app".
|
||||
*
|
||||
*/
|
||||
if (!defined('APP_DIR')) {
|
||||
define('APP_DIR', basename(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
|
||||
*
|
||||
* Un-comment this line to specify a fixed path to CakePHP.
|
||||
* This should point at the directory containing `Cake`.
|
||||
*
|
||||
* For ease of development CakePHP uses PHP's include_path. If you
|
||||
* cannot modify your include_path set this value.
|
||||
*
|
||||
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
||||
*
|
||||
* The following line differs from its sibling
|
||||
* /app/webroot/index.php
|
||||
*/
|
||||
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
|
||||
|
||||
/**
|
||||
* Editing below this line should NOT be necessary.
|
||||
* Change at your own risk.
|
||||
*
|
||||
*/
|
||||
if (!defined('WEBROOT_DIR')) {
|
||||
define('WEBROOT_DIR', basename(dirname(__FILE__)));
|
||||
}
|
||||
if (!defined('WWW_ROOT')) {
|
||||
define('WWW_ROOT', dirname(__FILE__) . DS);
|
||||
}
|
||||
|
||||
// for built-in server
|
||||
if (php_sapi_name() === 'cli-server') {
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
|
||||
return false;
|
||||
}
|
||||
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
|
||||
}
|
||||
|
||||
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||
if (function_exists('ini_set')) {
|
||||
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
||||
}
|
||||
if (!include 'Cake' . DS . 'bootstrap.php') {
|
||||
$failed = true;
|
||||
}
|
||||
} else {
|
||||
if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
|
||||
$failed = true;
|
||||
}
|
||||
}
|
||||
if (!empty($failed)) {
|
||||
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
|
||||
}
|
||||
|
||||
App::uses('Dispatcher', 'Routing');
|
||||
|
||||
$Dispatcher = new Dispatcher();
|
||||
$Dispatcher->dispatch(
|
||||
new CakeRequest(),
|
||||
new CakeResponse()
|
||||
);
|
0
lib/Cake/Console/Templates/skel/webroot/js/empty
Normal file
89
lib/Cake/Console/Templates/skel/webroot/test.php
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
/**
|
||||
* Web Access Frontend for TestSuite
|
||||
*
|
||||
* @link http://book.cakephp.org/2.0/en/development/testing.html
|
||||
* @package app.webroot
|
||||
* @since CakePHP(tm) v 1.2.0.4433
|
||||
*/
|
||||
|
||||
set_time_limit(0);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
/**
|
||||
* Use the DS to separate the directories in other defines
|
||||
*/
|
||||
if (!defined('DS')) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* These defines should only be edited if you have cake installed in
|
||||
* a directory layout other than the way it is distributed.
|
||||
* When using custom settings be sure to use the DS and do not add a trailing DS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The full path to the directory which holds "app", WITHOUT a trailing DS.
|
||||
*
|
||||
*/
|
||||
if (!defined('ROOT')) {
|
||||
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual directory name for the "app".
|
||||
*
|
||||
*/
|
||||
if (!defined('APP_DIR')) {
|
||||
define('APP_DIR', basename(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute path to the "Cake" directory, WITHOUT a trailing DS.
|
||||
*
|
||||
* For ease of development CakePHP uses PHP's include_path. If you
|
||||
* need to cannot modify your include_path, you can set this path.
|
||||
*
|
||||
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
||||
*
|
||||
* The following line differs from its sibling
|
||||
* /app/webroot/test.php
|
||||
*/
|
||||
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
|
||||
|
||||
/**
|
||||
* Editing below this line should not be necessary.
|
||||
* Change at your own risk.
|
||||
*
|
||||
*/
|
||||
if (!defined('WEBROOT_DIR')) {
|
||||
define('WEBROOT_DIR', basename(dirname(__FILE__)));
|
||||
}
|
||||
if (!defined('WWW_ROOT')) {
|
||||
define('WWW_ROOT', dirname(__FILE__) . DS);
|
||||
}
|
||||
|
||||
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||
if (function_exists('ini_set')) {
|
||||
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
||||
}
|
||||
if (!include 'Cake' . DS . 'bootstrap.php') {
|
||||
$failed = true;
|
||||
}
|
||||
} else {
|
||||
if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
|
||||
$failed = true;
|
||||
}
|
||||
}
|
||||
if (!empty($failed)) {
|
||||
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
|
||||
}
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.'));
|
||||
}
|
||||
|
||||
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
|
||||
|
||||
CakeTestSuiteDispatcher::run();
|