mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'master' into 2.6
This commit is contained in:
commit
7e8d378502
38 changed files with 189 additions and 102 deletions
|
@ -18,7 +18,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* Using the Schema command line utility
|
||||
* cake schema run create DbAcl
|
||||
|
@ -26,10 +26,22 @@
|
|||
*/
|
||||
class DbAclSchema extends CakeSchema {
|
||||
|
||||
/**
|
||||
* Before event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return boolean success
|
||||
*/
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* After event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return void
|
||||
*/
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class CommandListShell extends AppShell {
|
|||
/**
|
||||
* Output text.
|
||||
*
|
||||
* @param array $shellList
|
||||
* @param array $shellList The shell list.
|
||||
* @return void
|
||||
*/
|
||||
protected function _asText($shellList) {
|
||||
|
@ -95,7 +95,7 @@ class CommandListShell extends AppShell {
|
|||
/**
|
||||
* Output as XML
|
||||
*
|
||||
* @param array $shellList
|
||||
* @param array $shellList The shell list.
|
||||
* @return void
|
||||
*/
|
||||
protected function _asXml($shellList) {
|
||||
|
|
|
@ -144,7 +144,7 @@ class CompletionShell extends AppShell {
|
|||
/**
|
||||
* Emit results as a string, space delimited
|
||||
*
|
||||
* @param array $options
|
||||
* @param array $options The options to output
|
||||
* @return void
|
||||
*/
|
||||
protected function _output($options = array()) {
|
||||
|
|
|
@ -193,7 +193,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Override main() to handle action
|
||||
*
|
||||
* @param string $command
|
||||
* @param string $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
public function main($command = null) {
|
||||
|
@ -218,7 +218,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Determine the method to process the current command
|
||||
*
|
||||
* @param string $command
|
||||
* @param string $command The command to run.
|
||||
* @return string or false
|
||||
*/
|
||||
protected function _method($command) {
|
||||
|
@ -256,7 +256,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Bind an association
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _bind($command) {
|
||||
|
@ -283,7 +283,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Unbind an association
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _unbind($command) {
|
||||
|
@ -320,7 +320,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Perform a find
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _find($command) {
|
||||
|
@ -382,7 +382,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Save a record
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _save($command) {
|
||||
|
@ -406,7 +406,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Show the columns for a model
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _columns($command) {
|
||||
|
@ -455,7 +455,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Parse an array URL and show the equivalent URL as a string
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _routeToString($command) {
|
||||
|
@ -471,7 +471,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Parse a string URL and show as an array
|
||||
*
|
||||
* @param mixed $command
|
||||
* @param mixed $command The command to run.
|
||||
* @return void
|
||||
*/
|
||||
protected function _routeToArray($command) {
|
||||
|
@ -483,7 +483,7 @@ class ConsoleShell extends AppShell {
|
|||
/**
|
||||
* Tells if the specified model is included in the list of available models
|
||||
*
|
||||
* @param string $modelToCheck
|
||||
* @param string $modelToCheck The model to check.
|
||||
* @return boolean true if is an available model, false otherwise
|
||||
*/
|
||||
protected function _isValidModel($modelToCheck) {
|
||||
|
|
|
@ -311,8 +311,8 @@ class SchemaShell extends AppShell {
|
|||
* Create database from Schema object
|
||||
* Should be called via the run method
|
||||
*
|
||||
* @param CakeSchema $Schema
|
||||
* @param string $table
|
||||
* @param CakeSchema $Schema The schema instance to create.
|
||||
* @param string $table The table name.
|
||||
* @return void
|
||||
*/
|
||||
protected function _create(CakeSchema $Schema, $table = null) {
|
||||
|
@ -362,8 +362,8 @@ class SchemaShell extends AppShell {
|
|||
* Update database with Schema object
|
||||
* Should be called via the run method
|
||||
*
|
||||
* @param CakeSchema $Schema
|
||||
* @param string $table
|
||||
* @param CakeSchema &$Schema The schema instance
|
||||
* @param string $table The table name.
|
||||
* @return void
|
||||
*/
|
||||
protected function _update(&$Schema, $table = null) {
|
||||
|
@ -417,9 +417,9 @@ class SchemaShell extends AppShell {
|
|||
/**
|
||||
* Runs sql from _create() or _update()
|
||||
*
|
||||
* @param array $contents
|
||||
* @param string $event
|
||||
* @param CakeSchema $Schema
|
||||
* @param array $contents The contents to execute.
|
||||
* @param string $event The event to fire
|
||||
* @param CakeSchema $Schema The schema instance.
|
||||
* @return void
|
||||
*/
|
||||
protected function _run($contents, $event, CakeSchema $Schema) {
|
||||
|
|
|
@ -53,9 +53,9 @@ class CommandTask extends AppShell {
|
|||
/**
|
||||
* Scan the provided paths for shells, and append them into $shellList
|
||||
*
|
||||
* @param string $type
|
||||
* @param array $shells
|
||||
* @param array $shellList
|
||||
* @param string $type The type of object.
|
||||
* @param array $shells The shell name.
|
||||
* @param array &$shellList List of shells.
|
||||
* @return void
|
||||
*/
|
||||
protected function _appendShells($type, $shells, &$shellList) {
|
||||
|
@ -90,7 +90,7 @@ class CommandTask extends AppShell {
|
|||
/**
|
||||
* Return a list of subcommands for a given command
|
||||
*
|
||||
* @param string $commandName
|
||||
* @param string $commandName The command you want subcommands from.
|
||||
* @return array
|
||||
*/
|
||||
public function subCommands($commandName) {
|
||||
|
@ -127,7 +127,7 @@ class CommandTask extends AppShell {
|
|||
/**
|
||||
* Get Shell instance for the given command
|
||||
*
|
||||
* @param mixed $commandName
|
||||
* @param mixed $commandName The command you want.
|
||||
* @return mixed
|
||||
*/
|
||||
public function getShell($commandName) {
|
||||
|
@ -157,7 +157,7 @@ class CommandTask extends AppShell {
|
|||
/**
|
||||
* Get Shell instance for the given command
|
||||
*
|
||||
* @param mixed $commandName
|
||||
* @param mixed $commandName The command to get options for.
|
||||
* @return array
|
||||
*/
|
||||
public function options($commandName) {
|
||||
|
|
|
@ -224,10 +224,10 @@ class ControllerTask extends BakeTask {
|
|||
/**
|
||||
* Confirm a to be baked controller with the user
|
||||
*
|
||||
* @param string $controllerName
|
||||
* @param string $useDynamicScaffold
|
||||
* @param array $helpers
|
||||
* @param array $components
|
||||
* @param string $controllerName The name of the controller.
|
||||
* @param string $useDynamicScaffold Whether or not to use dynamic scaffolds.
|
||||
* @param array $helpers The list of helpers to include.
|
||||
* @param array $components The list of components to include.
|
||||
* @return void
|
||||
*/
|
||||
public function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) {
|
||||
|
|
|
@ -199,7 +199,7 @@ class DbConfigTask extends AppShell {
|
|||
/**
|
||||
* Output verification message and bake if it looks good
|
||||
*
|
||||
* @param array $config
|
||||
* @param array $config The config data.
|
||||
* @return boolean True if user says it looks good, false otherwise
|
||||
*/
|
||||
protected function _verify($config) {
|
||||
|
|
|
@ -242,10 +242,10 @@ class ExtractTask extends AppShell {
|
|||
*
|
||||
* Takes care of duplicate translations
|
||||
*
|
||||
* @param string $category
|
||||
* @param string $domain
|
||||
* @param string $msgid
|
||||
* @param array $details
|
||||
* @param string $category The category
|
||||
* @param string $domain The domain
|
||||
* @param string $msgid The message string
|
||||
* @param array $details The file and line references
|
||||
* @return void
|
||||
*/
|
||||
protected function _addTranslation($category, $domain, $msgid, $details = array()) {
|
||||
|
@ -582,10 +582,10 @@ class ExtractTask extends AppShell {
|
|||
/**
|
||||
* Prepare a file to be stored
|
||||
*
|
||||
* @param string $category
|
||||
* @param string $domain
|
||||
* @param string $header
|
||||
* @param string $sentence
|
||||
* @param string $category The category
|
||||
* @param string $domain The domain
|
||||
* @param string $header The header content.
|
||||
* @param string $sentence The sentence to store.
|
||||
* @return void
|
||||
*/
|
||||
protected function _store($category, $domain, $header, $sentence) {
|
||||
|
@ -678,7 +678,7 @@ class ExtractTask extends AppShell {
|
|||
/**
|
||||
* Get the strings from the position forward
|
||||
*
|
||||
* @param integer $position Actual position on tokens array
|
||||
* @param integer &$position Actual position on tokens array
|
||||
* @param integer $target Number of strings to extract
|
||||
* @return array Strings extracted
|
||||
*/
|
||||
|
|
|
@ -316,7 +316,7 @@ class FixtureTask extends BakeTask {
|
|||
* Generate String representation of Records
|
||||
*
|
||||
* @param array $tableInfo Table schema array
|
||||
* @param integer $recordCount
|
||||
* @param integer $recordCount The number of records to generate.
|
||||
* @return array Array of records to use in the fixture.
|
||||
*/
|
||||
protected function _generateRecords($tableInfo, $recordCount = 1) {
|
||||
|
|
|
@ -401,7 +401,7 @@ class ModelTask extends BakeTask {
|
|||
*
|
||||
* @param string $fieldName Name of field to be validated.
|
||||
* @param array $metaData metadata for field
|
||||
* @param string $primaryKey
|
||||
* @param string $primaryKey The primary key field.
|
||||
* @return array Array of validation for the field.
|
||||
*/
|
||||
public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
|
||||
|
@ -510,7 +510,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Handles associations
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model The model object
|
||||
* @return array Associations
|
||||
*/
|
||||
public function doAssociations($model) {
|
||||
|
@ -562,7 +562,7 @@ class ModelTask extends BakeTask {
|
|||
/**
|
||||
* Handles behaviors
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model The model object.
|
||||
* @return array Behaviors
|
||||
*/
|
||||
public function doActsAs($model) {
|
||||
|
|
|
@ -73,7 +73,7 @@ class PluginTask extends AppShell {
|
|||
/**
|
||||
* Interactive interface
|
||||
*
|
||||
* @param string $plugin
|
||||
* @param string $plugin The plugin name.
|
||||
* @return void
|
||||
*/
|
||||
protected function _interactive($plugin = null) {
|
||||
|
@ -184,7 +184,7 @@ class PluginTask extends AppShell {
|
|||
/**
|
||||
* find and change $this->path to the user selection
|
||||
*
|
||||
* @param array $pathOptions
|
||||
* @param array $pathOptions The list of paths to look in.
|
||||
* @return void
|
||||
*/
|
||||
public function findPath($pathOptions) {
|
||||
|
|
|
@ -102,7 +102,7 @@ class TestTask extends BakeTask {
|
|||
/**
|
||||
* Handles interactive baking
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type The type of object to bake a test for.
|
||||
* @return string|boolean
|
||||
*/
|
||||
protected function _interactive($type = null) {
|
||||
|
|
|
@ -298,7 +298,7 @@ class ViewTask extends BakeTask {
|
|||
* Bake a view file for each of the supplied actions
|
||||
*
|
||||
* @param array $actions Array of actions to make files for.
|
||||
* @param array $vars
|
||||
* @param array $vars The template variables.
|
||||
* @return void
|
||||
*/
|
||||
public function bakeActions($actions, $vars) {
|
||||
|
@ -454,7 +454,7 @@ class ViewTask extends BakeTask {
|
|||
/**
|
||||
* Returns associations for controllers models.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model The Model instance.
|
||||
* @return array $associations
|
||||
*/
|
||||
protected function _associations(Model $model) {
|
||||
|
|
|
@ -334,9 +334,9 @@ class TestShell extends Shell {
|
|||
/**
|
||||
* Find the test case for the passed file. The file could itself be a test.
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $category
|
||||
* @param boolean $throwOnMissingFile
|
||||
* @param string $file The file to map.
|
||||
* @param string $category The test file category.
|
||||
* @param boolean $throwOnMissingFile Whether or not to throw an exception.
|
||||
* @return array array(type, case)
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -411,7 +411,7 @@ class TestShell extends Shell {
|
|||
/**
|
||||
* For the given file, what category of test is it? returns app, core or the name of the plugin
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $file The file to map.
|
||||
* @return string
|
||||
*/
|
||||
protected function _mapFileToCategory($file) {
|
||||
|
|
|
@ -554,6 +554,7 @@ class UpgradeShell extends AppShell {
|
|||
/**
|
||||
* Replace cakeError with built-in exceptions.
|
||||
* NOTE: this ignores calls where you've passed your own secondary parameters to cakeError().
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function exceptions() {
|
||||
|
@ -661,7 +662,7 @@ class UpgradeShell extends AppShell {
|
|||
* Find all php files in the folder (honoring recursive) and determine where CakePHP expects the file to be
|
||||
* If the file is not exactly where CakePHP expects it - move it.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $path The path to move files in.
|
||||
* @param array $options array(recursive, checkFolder)
|
||||
* @return void
|
||||
*/
|
||||
|
@ -763,7 +764,7 @@ class UpgradeShell extends AppShell {
|
|||
/**
|
||||
* Searches the paths and finds files based on extension.
|
||||
*
|
||||
* @param string $extensions
|
||||
* @param string $extensions The extensions to include. Defaults to none.
|
||||
* @return void
|
||||
*/
|
||||
protected function _findFiles($extensions = '') {
|
||||
|
|
|
@ -132,7 +132,7 @@ class ConsoleInputArgument {
|
|||
/**
|
||||
* Check that $value is a valid choice for this argument.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value The choice to validate.
|
||||
* @return boolean
|
||||
* @throws ConsoleException
|
||||
*/
|
||||
|
|
|
@ -177,7 +177,7 @@ class ConsoleInputOption {
|
|||
/**
|
||||
* Check that a value is a valid choice for this option.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value The choice to validate.
|
||||
* @return boolean
|
||||
* @throws ConsoleException
|
||||
*/
|
||||
|
|
|
@ -203,7 +203,7 @@ class ConsoleOutput {
|
|||
/**
|
||||
* Replace tags with color codes.
|
||||
*
|
||||
* @param array $matches.
|
||||
* @param array $matches An array of matches to replace.
|
||||
* @return string
|
||||
*/
|
||||
protected function _replaceTags($matches) {
|
||||
|
|
|
@ -159,7 +159,7 @@ class HelpFormatter {
|
|||
/**
|
||||
* Iterate over a collection and find the longest named thing.
|
||||
*
|
||||
* @param array $collection
|
||||
* @param array $collection The collection to find a max length of.
|
||||
* @return integer
|
||||
*/
|
||||
protected function _getMaxLength($collection) {
|
||||
|
|
|
@ -262,7 +262,7 @@ class Shell extends Object {
|
|||
/**
|
||||
* Lazy loads models using the loadModel() method if declared in $uses
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name The name of the model to look for.
|
||||
* @return void
|
||||
*/
|
||||
public function __isset($name) {
|
||||
|
@ -454,7 +454,7 @@ class Shell extends Object {
|
|||
/**
|
||||
* Display the help in the correct format
|
||||
*
|
||||
* @param string $command
|
||||
* @param string $command The command to get help for.
|
||||
* @return void
|
||||
*/
|
||||
protected function _displayHelp($command) {
|
||||
|
@ -485,7 +485,7 @@ class Shell extends Object {
|
|||
/**
|
||||
* Overload get for lazy building of tasks
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name The property name to access.
|
||||
* @return Shell Object of Task
|
||||
*/
|
||||
public function __get($name) {
|
||||
|
@ -860,7 +860,7 @@ class Shell extends Object {
|
|||
/**
|
||||
* creates the singular name for use in views.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name The plural underscored value.
|
||||
* @return string $name
|
||||
*/
|
||||
protected function _singularName($name) {
|
||||
|
|
|
@ -317,7 +317,7 @@ class ShellDispatcher {
|
|||
/**
|
||||
* Parses out the paths from from the argv
|
||||
*
|
||||
* @param array $args
|
||||
* @param array $args The argv to parse.
|
||||
* @return void
|
||||
*/
|
||||
protected function _parsePaths($args) {
|
||||
|
|
|
@ -43,7 +43,7 @@ class TaskCollection extends ObjectCollection {
|
|||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Shell $Shell
|
||||
* @param Shell $Shell The shell this task collection is attached to.
|
||||
*/
|
||||
public function __construct(Shell $Shell) {
|
||||
$this->_Shell = $Shell;
|
||||
|
|
|
@ -17,13 +17,28 @@
|
|||
*/
|
||||
class DbAclSchema extends CakeSchema {
|
||||
|
||||
/**
|
||||
* Before event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return boolean 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),
|
||||
|
@ -35,6 +50,9 @@ class DbAclSchema extends CakeSchema {
|
|||
'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),
|
||||
|
@ -46,6 +64,10 @@ class DbAclSchema extends CakeSchema {
|
|||
'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'),
|
||||
|
|
|
@ -19,15 +19,37 @@
|
|||
*/
|
||||
class I18nSchema extends CakeSchema {
|
||||
|
||||
/**
|
||||
* The name property
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'i18n';
|
||||
|
||||
/**
|
||||
* Before event.
|
||||
*
|
||||
* @param array $event The event data.
|
||||
* @return boolean 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'),
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* @since CakePHP(tm) v 0.2.9
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* Using the Schema command line utility
|
||||
* cake schema run create Sessions
|
||||
|
@ -17,15 +17,37 @@
|
|||
*/
|
||||
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),
|
||||
|
|
|
@ -31,10 +31,9 @@ class PagesController extends AppController {
|
|||
/**
|
||||
* Displays a view
|
||||
*
|
||||
* @param mixed What page to display
|
||||
* @return void
|
||||
* @throws NotFoundException When the view file could not be found
|
||||
* or MissingViewException in debug mode.
|
||||
* or MissingViewException in debug mode.
|
||||
*/
|
||||
public function display() {
|
||||
$path = func_get_args();
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
|
||||
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');
|
||||
|
|
|
@ -243,7 +243,7 @@ class CakeNumber {
|
|||
* - `decimals` - Decimal separator symbol ie. '.'
|
||||
*
|
||||
* @param float $value A floating point number
|
||||
* @param array $options
|
||||
* @param array $options Options list.
|
||||
* @return string formatted delta
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::formatDelta
|
||||
*/
|
||||
|
@ -258,10 +258,10 @@ class CakeNumber {
|
|||
/**
|
||||
* Alternative number_format() to accommodate multibyte decimals and thousands < PHP 5.4
|
||||
*
|
||||
* @param float $value
|
||||
* @param integer $places
|
||||
* @param string $decimals
|
||||
* @param string $thousands
|
||||
* @param float $value Value to format.
|
||||
* @param integer $places Decimal places to use.
|
||||
* @param string $decimals Decimal position string.
|
||||
* @param string $thousands Thousands separator string.
|
||||
* @return string
|
||||
*/
|
||||
protected static function _numberFormat($value, $places = 0, $decimals = '.', $thousands = ',') {
|
||||
|
@ -315,10 +315,10 @@ class CakeNumber {
|
|||
* By default all currencies contain utf-8 symbols and don't need this changed. If you require
|
||||
* non HTML encoded symbols you will need to update the settings with the correct bytes.
|
||||
*
|
||||
* @param float $value
|
||||
* @param float $value Value to format.
|
||||
* @param string $currency Shortcut to default options. Valid values are
|
||||
* 'USD', 'EUR', 'GBP', otherwise set at least 'before' and 'after' options.
|
||||
* @param array $options
|
||||
* @param array $options Options list.
|
||||
* @return string Number formatted as a currency.
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::currency
|
||||
*/
|
||||
|
|
|
@ -86,6 +86,7 @@ class ClassRegistry {
|
|||
* array('class' => 'ClassName', 'alias' => 'AliasNameStoredInTheRegistry')
|
||||
* );
|
||||
* }}}
|
||||
*
|
||||
* @param string|array $class as a string or a single key => value array instance will be created,
|
||||
* stored in the registry and returned.
|
||||
* @param boolean $strict if set to true it will return false if the class was not found instead
|
||||
|
@ -303,8 +304,8 @@ class ClassRegistry {
|
|||
/**
|
||||
* Checks to see if $alias is a duplicate $class Object
|
||||
*
|
||||
* @param string $alias
|
||||
* @param string $class
|
||||
* @param string $alias Alias to check.
|
||||
* @param string $class Class name.
|
||||
* @return boolean
|
||||
*/
|
||||
protected function &_duplicate($alias, $class) {
|
||||
|
|
|
@ -148,7 +148,7 @@ class Debugger {
|
|||
/**
|
||||
* Returns a reference to the Debugger singleton object instance.
|
||||
*
|
||||
* @param string $class
|
||||
* @param string $class Debugger class name.
|
||||
* @return object
|
||||
*/
|
||||
public static function getInstance($class = null) {
|
||||
|
@ -167,7 +167,6 @@ class Debugger {
|
|||
/**
|
||||
* Recursively formats and outputs the contents of the supplied variable.
|
||||
*
|
||||
*
|
||||
* @param mixed $var the variable to dump
|
||||
* @param int $depth The depth to output to. Defaults to 3.
|
||||
* @return void
|
||||
|
@ -724,7 +723,7 @@ class Debugger {
|
|||
/**
|
||||
* Takes a processed array of data from an error and displays it in the chosen format.
|
||||
*
|
||||
* @param string $data
|
||||
* @param string $data Data to output.
|
||||
* @return void
|
||||
*/
|
||||
public function outputError($data) {
|
||||
|
|
|
@ -202,7 +202,7 @@ class File {
|
|||
* all other platforms will use "\n"
|
||||
*
|
||||
* @param string $data Data to prepare for writing.
|
||||
* @param boolean $forceWindows
|
||||
* @param boolean $forceWindows If true forces usage Windows newline string.
|
||||
* @return string The with converted line endings.
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::prepare
|
||||
*/
|
||||
|
|
|
@ -671,7 +671,7 @@ class Hash {
|
|||
/**
|
||||
* Checks to see if all the values in the array are numeric
|
||||
*
|
||||
* @param array $array The array to check.
|
||||
* @param array $data The array to check.
|
||||
* @return boolean true if values are numeric, false otherwise
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::numeric
|
||||
*/
|
||||
|
@ -689,7 +689,7 @@ class Hash {
|
|||
* If you have an un-even or heterogenous array, consider using Hash::maxDimensions()
|
||||
* to get the dimensions of the array.
|
||||
*
|
||||
* @param array $array Array to count dimensions on
|
||||
* @param array $data Array to count dimensions on
|
||||
* @return integer The number of dimensions in $data
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::dimensions
|
||||
*/
|
||||
|
|
|
@ -521,7 +521,7 @@ class Inflector {
|
|||
/**
|
||||
* Returns camelBacked version of an underscored string.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $string String to convert.
|
||||
* @return string in variable form
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/inflector.html#Inflector::variable
|
||||
*/
|
||||
|
|
|
@ -82,8 +82,7 @@ abstract class ObjectCollection {
|
|||
* Any non-null value will modify the parameter index indicated.
|
||||
* Defaults to false.
|
||||
*
|
||||
*
|
||||
* @param string $callback|CakeEvent Method to fire on all the objects. Its assumed all the objects implement
|
||||
* @param string|CakeEvent $callback Method to fire on all the objects. Its assumed all the objects implement
|
||||
* the method you are calling. If an instance of CakeEvent is provided, then then Event name will parsed to
|
||||
* get the callback name. This is done by getting the last word after any dot in the event name
|
||||
* (eg. `Model.afterSave` event will trigger the `afterSave` callback)
|
||||
|
@ -172,7 +171,7 @@ abstract class ObjectCollection {
|
|||
* Enables callbacks on an object or array of objects
|
||||
*
|
||||
* @param string|array $name CamelCased name of the object(s) to enable (string or array)
|
||||
* @param boolean Prioritize enabled list after enabling object(s)
|
||||
* @param boolean $prioritize Prioritize enabled list after enabling object(s)
|
||||
* @return void
|
||||
*/
|
||||
public function enable($name, $prioritize = true) {
|
||||
|
@ -213,7 +212,7 @@ abstract class ObjectCollection {
|
|||
* @param string|array $name CamelCased name of the object(s) to enable (string or array)
|
||||
* If string the second param $priority is used else it should be an associative array
|
||||
* with keys as object names and values as priorities to set.
|
||||
* @param integer|null Integer priority to set or null for default
|
||||
* @param integer|null $priority Integer priority to set or null for default
|
||||
* @return void
|
||||
*/
|
||||
public function setPriority($name, $priority = null) {
|
||||
|
|
|
@ -277,7 +277,12 @@ class Security {
|
|||
$salt = vsprintf('$2a$%02d$%s', array(self::$hashCost, $salt));
|
||||
}
|
||||
|
||||
if ($salt === true || strpos($salt, '$2a$') !== 0 || strlen($salt) < 29) {
|
||||
$invalidCipher = (
|
||||
strpos($salt, '$2y$') !== 0 &&
|
||||
strpos($salt, '$2x$') !== 0 &&
|
||||
strpos($salt, '$2a$') !== 0
|
||||
);
|
||||
if ($salt === true || $invalidCipher || strlen($salt) < 29) {
|
||||
trigger_error(__d(
|
||||
'cake_dev',
|
||||
'Invalid salt: %s for %s Please visit http://www.php.net/crypt and read the appropriate section for building %s salts.',
|
||||
|
@ -324,7 +329,7 @@ class Security {
|
|||
/**
|
||||
* Check the encryption key for proper length.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $key Key to check.
|
||||
* @param string $method The method the key is being checked for.
|
||||
* @return void
|
||||
* @throws CakeException When key length is not 256 bit/32 bytes
|
||||
|
|
|
@ -412,8 +412,8 @@ class Validation {
|
|||
* - true => Any number of decimal places greater than 0, or a float|double. The '.' is required.
|
||||
* - 1..N => Exactly that many number of decimal places. The '.' is required.
|
||||
*
|
||||
* @param float $check The value the test for decimal
|
||||
* @param integer $places
|
||||
* @param float $check The value the test for decimal.
|
||||
* @param integer $places Decimal places.
|
||||
* @param string $regex If a custom regular expression is used, this is the only validation that will occur.
|
||||
* @return boolean Success
|
||||
*/
|
||||
|
@ -914,8 +914,8 @@ class Validation {
|
|||
/**
|
||||
* Luhn algorithm
|
||||
*
|
||||
* @param string|array $check
|
||||
* @param boolean $deep
|
||||
* @param string|array $check Value to check.
|
||||
* @param boolean $deep If true performs deep check.
|
||||
* @return boolean Success
|
||||
* @see http://en.wikipedia.org/wiki/Luhn_algorithm
|
||||
*/
|
||||
|
@ -947,7 +947,7 @@ class Validation {
|
|||
/**
|
||||
* Checks the mime type of a file.
|
||||
*
|
||||
* @param string|array $check
|
||||
* @param string|array $check Value to check.
|
||||
* @param array|string $mimeTypes Array of mime types or regex pattern to check.
|
||||
* @return boolean Success
|
||||
* @throws CakeException when mime type can not be determined.
|
||||
|
@ -977,9 +977,9 @@ class Validation {
|
|||
/**
|
||||
* Checks the filesize
|
||||
*
|
||||
* @param string|array $check
|
||||
* @param integer|string $size Size in bytes or human readable string like '5MB'
|
||||
* @param string $operator See `Validation::comparison()`
|
||||
* @param string|array $check Value to check.
|
||||
* @param string $operator See `Validation::comparison()`.
|
||||
* @param integer|string $size Size in bytes or human readable string like '5MB'.
|
||||
* @return boolean Success
|
||||
*/
|
||||
public static function fileSize($check, $operator = null, $size = null) {
|
||||
|
@ -998,7 +998,7 @@ class Validation {
|
|||
/**
|
||||
* Checking for upload errors
|
||||
*
|
||||
* @param string|array $check
|
||||
* @param string|array $check Value to check.
|
||||
* @return boolean
|
||||
* @see http://www.php.net/manual/en/features.file-upload.errors.php
|
||||
*/
|
||||
|
|
|
@ -228,7 +228,7 @@ class Xml {
|
|||
*
|
||||
* @param DOMDocument $dom Handler to DOMDocument
|
||||
* @param DOMElement $node Handler to DOMElement (child)
|
||||
* @param array $data Array of data to append to the $node.
|
||||
* @param array &$data Array of data to append to the $node.
|
||||
* @param string $format Either 'attribute' or 'tags'. This determines where nested keys go.
|
||||
* @return void
|
||||
* @throws XmlException
|
||||
|
@ -348,7 +348,7 @@ class Xml {
|
|||
* Recursive method to toArray
|
||||
*
|
||||
* @param SimpleXMLElement $xml SimpleXMLElement object
|
||||
* @param array $parentData Parent array with data
|
||||
* @param array &$parentData Parent array with data
|
||||
* @param string $ns Namespace of current child
|
||||
* @param array $namespaces List of namespaces in XML
|
||||
* @return void
|
||||
|
|
Loading…
Reference in a new issue