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
8e14b2f807
31 changed files with 314 additions and 292 deletions
|
@ -65,7 +65,7 @@ interface AclInterface {
|
|||
/**
|
||||
* Initialization method for the Acl implementation
|
||||
*
|
||||
* @param AclComponent $component
|
||||
* @param Component $component The AclComponent instance.
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(Component $component);
|
||||
|
|
|
@ -53,7 +53,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
/**
|
||||
* Initializes the containing component and sets the Aro/Aco objects to it.
|
||||
*
|
||||
* @param AclComponent $component
|
||||
* @param AclComponent $component The AclComponent instance.
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(Component $component) {
|
||||
|
|
|
@ -43,7 +43,7 @@ class IniAcl extends Object implements AclInterface {
|
|||
/**
|
||||
* Initialize method
|
||||
*
|
||||
* @param Component $component
|
||||
* @param Component $component The AclComponent instance.
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(Component $component) {
|
||||
|
|
|
@ -407,9 +407,9 @@ class PhpAro {
|
|||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $aro
|
||||
* @param array $map
|
||||
* @param array $aliases
|
||||
* @param array $aro The aro data
|
||||
* @param array $map The identifier mappings
|
||||
* @param array $aliases The aliases to map.
|
||||
*/
|
||||
public function __construct(array $aro = array(), array $map = array(), array $aliases = array()) {
|
||||
if (!empty($map)) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
|
@ -19,10 +17,9 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth');
|
|||
/**
|
||||
* Basic Authentication adapter for AuthComponent.
|
||||
*
|
||||
* Provides Basic HTTP authentication support for AuthComponent. Basic Auth will authenticate users
|
||||
* against the configured userModel and verify the username and passwords match. Clients using Basic Authentication
|
||||
* must support cookies. Since AuthComponent identifies users based on Session contents, clients using Basic
|
||||
* Auth must support cookies.
|
||||
* Provides Basic HTTP authentication support for AuthComponent. Basic Auth will
|
||||
* authenticate users against the configured userModel and verify the username
|
||||
* and passwords match.
|
||||
*
|
||||
* ### Using Basic auth
|
||||
*
|
||||
|
@ -35,8 +32,18 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth');
|
|||
* );
|
||||
* }}}
|
||||
*
|
||||
* In your login function just call `$this->Auth->login()` without any checks for POST data. This
|
||||
* will send the authentication headers, and trigger the login dialog in the browser/client.
|
||||
* You should also set `AuthComponent::$sessionKey = false;` in your AppController's
|
||||
* beforeFilter() to prevent CakePHP from sending a session cookie to the client.
|
||||
*
|
||||
* Since HTTP Basic Authentication is stateless you don't need a login() action
|
||||
* in your controller. The user credentials will be checked on each request. If
|
||||
* valid credentials are not provided, required authentication headers will be sent
|
||||
* by this authentication provider which triggers the login dialog in the browser/client.
|
||||
*
|
||||
* You may also want to use `$this->Auth->unauthorizedRedirect = false;`.
|
||||
* By default unauthorized user is redirected to the referrer URL or
|
||||
* AuthComponent::$loginAction or '/'. If unauthorizedRedirect is set to false a
|
||||
* ForbiddenException exception is thrown instead of redirecting.
|
||||
*
|
||||
* @package Cake.Controller.Component.Auth
|
||||
* @since 2.0
|
||||
|
|
|
@ -42,8 +42,8 @@ class AclBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Sets up the configuration for the model, and loads ACL models if they haven't been already
|
||||
*
|
||||
* @param Model $model
|
||||
* @param array $config
|
||||
* @param Model $model Model using this behavior.
|
||||
* @param array $config Configuration options.
|
||||
* @return void
|
||||
*/
|
||||
public function setup(Model $model, $config = array()) {
|
||||
|
@ -70,7 +70,7 @@ class AclBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Retrieves the Aro/Aco node for this model
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model Model using this behavior.
|
||||
* @param string|array|Model $ref Array with 'model' and 'foreign_key', model object, or string value
|
||||
* @param string $type Only needed when Acl is set up as 'both', specify 'Aro' or 'Aco' to get the correct node
|
||||
* @return array
|
||||
|
@ -93,7 +93,7 @@ class AclBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Creates a new ARO/ACO node bound to this record
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model Model using this behavior.
|
||||
* @param boolean $created True if this is a new record
|
||||
* @param array $options Options passed from Model::save().
|
||||
* @return void
|
||||
|
@ -125,7 +125,7 @@ class AclBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Destroys the ARO/ACO node bound to the deleted record
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model Model using this behavior.
|
||||
* @return void
|
||||
*/
|
||||
public function afterDelete(Model $model) {
|
||||
|
|
|
@ -367,7 +367,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* and to allow translations to be persisted even when validation
|
||||
* is disabled.
|
||||
*
|
||||
* @param Model $Model
|
||||
* @param Model $Model Model using this behavior.
|
||||
* @return void
|
||||
*/
|
||||
protected function _setRuntimeData(Model $Model) {
|
||||
|
@ -400,7 +400,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* Restores model data to the original data.
|
||||
* This solves issues with saveAssociated and validate = first.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $Model Model using this behavior.
|
||||
* @return void
|
||||
*/
|
||||
public function afterValidate(Model $Model) {
|
||||
|
@ -479,7 +479,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* Prepares the data to be saved for translated records.
|
||||
* Add blank fields, and populates data for multi-locale saves.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param array $data The sparse data that was provided.
|
||||
* @return array The fully populated data to save.
|
||||
*/
|
||||
|
@ -569,7 +569,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* *Note* You should avoid binding translations that overlap existing model properties.
|
||||
* This can cause un-expected and un-desirable behavior.
|
||||
*
|
||||
* @param Model $Model instance of model
|
||||
* @param Model $Model using this behavior of model
|
||||
* @param string|array $fields string with field or array(field1, field2=>AssocName, field3)
|
||||
* @param boolean $reset Leave true to have the fields only modified for the next operation.
|
||||
* if false the field will be added for all future queries.
|
||||
|
@ -642,7 +642,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Update runtime setting for a given field.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param string $field The field to update.
|
||||
* @return void
|
||||
*/
|
||||
|
@ -664,7 +664,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
* Unbind translation for fields, optionally unbinds hasMany association for
|
||||
* fake field
|
||||
*
|
||||
* @param Model $Model instance of model
|
||||
* @param Model $Model using this behavior of model
|
||||
* @param string|array $fields string with field, or array(field1, field2=>AssocName, field3), or null for
|
||||
* unbind all original translations
|
||||
* @return boolean
|
||||
|
|
|
@ -58,7 +58,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Initiate Tree behavior
|
||||
*
|
||||
* @param Model $Model instance of model
|
||||
* @param Model $Model using this behavior of model
|
||||
* @param array $config array of configuration settings.
|
||||
* @return void
|
||||
*/
|
||||
|
@ -84,7 +84,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* Overridden to transparently manage setting the lft and rght fields if and only if the parent field is included in the
|
||||
* parameters to be saved.
|
||||
*
|
||||
* @param Model $Model Model instance.
|
||||
* @param Model $Model Model using this behavior.
|
||||
* @param boolean $created indicates whether the node just saved was created or updated
|
||||
* @param array $options Options passed from Model::save().
|
||||
* @return boolean true on success, false on failure
|
||||
|
@ -120,8 +120,8 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* This is used to delete child nodes in the afterDelete.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param boolean $cascade
|
||||
* @param Model $Model Model using this behavior.
|
||||
* @param boolean $cascade If true records that depend on this record will also be deleted
|
||||
* @return boolean
|
||||
*/
|
||||
public function beforeDelete(Model $Model, $cascade = true) {
|
||||
|
@ -141,7 +141,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* Will delete the current node and all children using the deleteAll method and sync the table
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @return boolean true to continue, false to abort the delete
|
||||
*/
|
||||
public function afterDelete(Model $Model) {
|
||||
|
@ -172,8 +172,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* parameters to be saved. For newly created nodes with NO parent the left and right field values are set directly by
|
||||
* this method bypassing the setParent logic.
|
||||
*
|
||||
* @since 1.2
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param array $options Options passed from Model::save().
|
||||
* @return boolean true to continue, false to abort the save
|
||||
* @see Model::save()
|
||||
|
@ -243,7 +242,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* If the direct parameter is set to true, only the direct children are counted (based upon the parent_id field)
|
||||
* If false is passed for the id parameter, all top level nodes are counted, or all nodes are counted.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string|boolean $id The ID of the record to read or false to read all top level nodes
|
||||
* @param boolean $direct whether to count direct, or all, children
|
||||
* @return integer number of child nodes
|
||||
|
@ -284,7 +283,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* If the direct parameter is set to true, only the direct children are returned (based upon the parent_id field)
|
||||
* If false is passed for the id parameter, top level, or all (depending on direct parameter appropriate) are counted.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $id The ID of the record to read
|
||||
* @param boolean $direct whether to return only the direct, or all, children
|
||||
* @param string|array $fields Either a single string of a field name, or an array of field names
|
||||
|
@ -343,7 +342,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
/**
|
||||
* A convenience method for returning a hierarchical array used for HTML select boxes
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param string|array $conditions SQL conditions as a string or as an array('field' =>'value',...)
|
||||
* @param string $keyPath A string path to the key, i.e. "{n}.Post.id"
|
||||
* @param string $valuePath A string path to the value, i.e. "{n}.Post.title"
|
||||
|
@ -407,9 +406,9 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* reads the parent id and returns this node
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $id The ID of the record to read
|
||||
* @param string|array $fields
|
||||
* @param string|array $fields Fields to get
|
||||
* @param integer $recursive The number of levels deep to fetch associated records
|
||||
* @return array|boolean Array of data for the parent node
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::getParentNode
|
||||
|
@ -440,7 +439,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
/**
|
||||
* Get the path to the given node
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $id The ID of the record to read
|
||||
* @param string|array $fields Either a single string of a field name, or an array of field names
|
||||
* @param integer $recursive The number of levels deep to fetch associated records
|
||||
|
@ -478,7 +477,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* If the node is the last child, or is a top level node with no subsequent node this method will return false
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $id The ID of the record to move
|
||||
* @param integer|boolean $number how many places to move the node or true to move to last position
|
||||
* @return boolean true on success, false on failure
|
||||
|
@ -536,7 +535,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* If the node is the first child, or is a top level node with no previous node this method will return false
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $id The ID of the record to move
|
||||
* @param integer|boolean $number how many places to move the node, or true to move to first position
|
||||
* @return boolean true on success, false on failure
|
||||
|
@ -598,7 +597,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* 'parent' the values of the parent_id field will be used to populate the left and right fields. The missingParentAction
|
||||
* parameter only applies to "parent" mode and determines what to do if the parent field contains an id that is not present.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param string $mode parent or tree
|
||||
* @param string|integer $missingParentAction 'return' to do nothing and return, 'delete' to
|
||||
* delete, or the id of the parent to set as the parent_id
|
||||
|
@ -657,9 +656,9 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* Recursive helper function used by recover
|
||||
*
|
||||
* @param Model $Model
|
||||
* @param integer $counter
|
||||
* @param mixed $parentId
|
||||
* @param Model $Model Model instance.
|
||||
* @param integer $counter Counter
|
||||
* @param mixed $parentId Parent record Id
|
||||
* @return integer $counter
|
||||
*/
|
||||
protected function _recoverByParentId(Model $Model, $counter = 1, $parentId = null) {
|
||||
|
@ -738,7 +737,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* - 'order' Direction to order either DESC or ASC (defaults to ASC)
|
||||
* - 'verify' Whether or not to verify the tree before reorder. defaults to true.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param array $options array of options to use in reordering.
|
||||
* @return boolean true on success, false on failure
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::reorder
|
||||
|
@ -776,7 +775,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
* If the parameter delete is false, the node will become a new top level node. Otherwise the node will be deleted
|
||||
* after the children are reparented.
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $id The ID of the record to remove
|
||||
* @param boolean $delete whether to delete the node after reparenting children (if any)
|
||||
* @return boolean true on success, false on failure
|
||||
|
@ -846,7 +845,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* Returns true if the tree is valid otherwise an array of (type, incorrect left/right index, message)
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param Model $Model Model using this behavior
|
||||
* @return mixed true if the tree is valid or empty, otherwise an array of (error type [index, node],
|
||||
* [incorrect left/right index,node id], message)
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::verify
|
||||
|
@ -918,9 +917,9 @@ class TreeBehavior extends ModelBehavior {
|
|||
* of recovering a corrupted table, or creating new nodes. Otherwise it should always be false. In reality this
|
||||
* method could be private, since calling save with parent_id set also calls setParent
|
||||
*
|
||||
* @param Model $Model Model instance
|
||||
* @param integer|string $parentId
|
||||
* @param boolean $created
|
||||
* @param Model $Model Model using this behavior
|
||||
* @param integer|string $parentId Parent record Id
|
||||
* @param boolean $created True if newly created record else false.
|
||||
* @return boolean true on success, false on failure
|
||||
*/
|
||||
protected function _setParent(Model $Model, $parentId = null, $created = false) {
|
||||
|
@ -988,11 +987,11 @@ class TreeBehavior extends ModelBehavior {
|
|||
/**
|
||||
* get the maximum index value in the table.
|
||||
*
|
||||
* @param Model $Model
|
||||
* @param string $scope
|
||||
* @param string $right
|
||||
* @param integer $recursive
|
||||
* @param boolean $created
|
||||
* @param Model $Model Model Instance.
|
||||
* @param string $scope Scoping conditions.
|
||||
* @param string $right Right value
|
||||
* @param integer $recursive Recursive find value.
|
||||
* @param boolean $created Whether it's a new record.
|
||||
* @return integer
|
||||
*/
|
||||
protected function _getMax(Model $Model, $scope, $right, $recursive = -1, $created = false) {
|
||||
|
@ -1018,10 +1017,10 @@ class TreeBehavior extends ModelBehavior {
|
|||
/**
|
||||
* get the minimum index value in the table.
|
||||
*
|
||||
* @param Model $Model
|
||||
* @param string $scope
|
||||
* @param string $left
|
||||
* @param integer $recursive
|
||||
* @param Model $Model Model instance.
|
||||
* @param string $scope Scoping conditions.
|
||||
* @param string $left Left value.
|
||||
* @param integer $recursive Recurursive find value.
|
||||
* @return integer
|
||||
*/
|
||||
protected function _getMin(Model $Model, $scope, $left, $recursive = -1) {
|
||||
|
@ -1041,12 +1040,12 @@ class TreeBehavior extends ModelBehavior {
|
|||
*
|
||||
* Handles table sync operations, Taking account of the behavior scope.
|
||||
*
|
||||
* @param Model $Model
|
||||
* @param integer $shift
|
||||
* @param string $dir
|
||||
* @param array $conditions
|
||||
* @param boolean $created
|
||||
* @param string $field
|
||||
* @param Model $Model Model instance.
|
||||
* @param integer $shift Shift by.
|
||||
* @param string $dir Direction.
|
||||
* @param array $conditions Conditions.
|
||||
* @param boolean $created Whether it's a new record.
|
||||
* @param string $field Field type.
|
||||
* @return void
|
||||
*/
|
||||
protected function _sync(Model $Model, $shift, $dir = '+', $conditions = array(), $created = false, $field = 'both') {
|
||||
|
|
|
@ -54,8 +54,8 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
|
|||
/**
|
||||
* Attaches a model object and loads a list of behaviors
|
||||
*
|
||||
* @param string $modelName
|
||||
* @param array $behaviors
|
||||
* @param string $modelName Model name.
|
||||
* @param array $behaviors Behaviors list.
|
||||
* @return void
|
||||
*/
|
||||
public function init($modelName, $behaviors = array()) {
|
||||
|
@ -71,8 +71,8 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
|
|||
/**
|
||||
* Backwards compatible alias for load()
|
||||
*
|
||||
* @param string $behavior
|
||||
* @param array $config
|
||||
* @param string $behavior Behavior name.
|
||||
* @param array $config Configuration options.
|
||||
* @return void
|
||||
* @deprecated Will be removed in 3.0. Replaced with load().
|
||||
*/
|
||||
|
|
|
@ -277,7 +277,7 @@ class CakeSession {
|
|||
/**
|
||||
* Used to write new data to _SESSION, since PHP doesn't like us setting the _SESSION var itself.
|
||||
*
|
||||
* @param array $old Set of old variables => values
|
||||
* @param array &$old Set of old variables => values
|
||||
* @param array $new New set of variable => value
|
||||
* @return void
|
||||
*/
|
||||
|
@ -547,6 +547,7 @@ class CakeSession {
|
|||
|
||||
/**
|
||||
* Returns whether a session exists
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected static function _hasSession() {
|
||||
|
@ -556,7 +557,7 @@ class CakeSession {
|
|||
/**
|
||||
* Find the handler class and make sure it implements the correct interface.
|
||||
*
|
||||
* @param string $handler
|
||||
* @param string $handler Handler name.
|
||||
* @return void
|
||||
* @throws CakeSessionException
|
||||
*/
|
||||
|
@ -576,7 +577,7 @@ class CakeSession {
|
|||
/**
|
||||
* Get one of the prebaked default session configurations.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name Config name.
|
||||
* @return boolean|array
|
||||
*/
|
||||
protected static function _defaultConfig($name) {
|
||||
|
|
|
@ -212,7 +212,7 @@ class Mysql extends DboSource {
|
|||
/**
|
||||
* Returns an array of sources (tables) in the database.
|
||||
*
|
||||
* @param mixed $data
|
||||
* @param mixed $data List of tables.
|
||||
* @return array Array of table names in the database
|
||||
*/
|
||||
public function listSources($data = null) {
|
||||
|
@ -240,7 +240,7 @@ class Mysql extends DboSource {
|
|||
/**
|
||||
* Builds a map of the columns contained in a result
|
||||
*
|
||||
* @param PDOStatement $results
|
||||
* @param PDOStatement $results The results to format.
|
||||
* @return void
|
||||
*/
|
||||
public function resultSet($results) {
|
||||
|
@ -374,10 +374,10 @@ class Mysql extends DboSource {
|
|||
/**
|
||||
* Generates and executes an SQL UPDATE statement for given model, fields, and values.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param array $fields
|
||||
* @param array $values
|
||||
* @param mixed $conditions
|
||||
* @param Model $model The model to update.
|
||||
* @param array $fields The fields to update.
|
||||
* @param array $values The values to set.
|
||||
* @param mixed $conditions The conditions to use.
|
||||
* @return array
|
||||
*/
|
||||
public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
|
||||
|
@ -418,8 +418,8 @@ class Mysql extends DboSource {
|
|||
/**
|
||||
* Generates and executes an SQL DELETE statement for given id/conditions on given model.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param mixed $conditions
|
||||
* @param Model $model The model to delete from.
|
||||
* @param mixed $conditions The conditions to use.
|
||||
* @return boolean Success
|
||||
*/
|
||||
public function delete(Model $model, $conditions = null) {
|
||||
|
@ -516,7 +516,7 @@ class Mysql extends DboSource {
|
|||
* Generate a MySQL Alter Table syntax for the given Schema comparison
|
||||
*
|
||||
* @param array $compare Result of a CakeSchema::compare()
|
||||
* @param string $table
|
||||
* @param string $table The table name.
|
||||
* @return array Array of alter statements to make.
|
||||
*/
|
||||
public function alterSchema($compare, $table = null) {
|
||||
|
|
|
@ -158,7 +158,7 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
|
||||
*
|
||||
* @param mixed $data
|
||||
* @param mixed $data The sources to list.
|
||||
* @return array Array of table names in the database
|
||||
*/
|
||||
public function listSources($data = null) {
|
||||
|
@ -361,7 +361,7 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* Prepares field names to be quoted by parent
|
||||
*
|
||||
* @param string $data
|
||||
* @param string $data The name to format.
|
||||
* @return string SQL field
|
||||
*/
|
||||
public function name($data) {
|
||||
|
@ -374,10 +374,10 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* Generates the fields list of an SQL query.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param string $alias Alias table name
|
||||
* @param mixed $fields
|
||||
* @param boolean $quote
|
||||
* @param Model $model The model to get fields for.
|
||||
* @param string $alias Alias table name.
|
||||
* @param mixed $fields The list of fields to get.
|
||||
* @param boolean $quote Whether or not to quote identifiers.
|
||||
* @return array
|
||||
*/
|
||||
public function fields(Model $model, $alias = null, $fields = array(), $quote = true) {
|
||||
|
@ -731,7 +731,7 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* resultSet method
|
||||
*
|
||||
* @param array $results
|
||||
* @param array &$results The results
|
||||
* @return void
|
||||
*/
|
||||
public function resultSet(&$results) {
|
||||
|
@ -886,8 +886,8 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* Format indexes for create table
|
||||
*
|
||||
* @param array $indexes
|
||||
* @param string $table
|
||||
* @param array $indexes The index to build
|
||||
* @param string $table The table name.
|
||||
* @return string
|
||||
*/
|
||||
public function buildIndex($indexes, $table = null) {
|
||||
|
@ -918,8 +918,8 @@ class Postgres extends DboSource {
|
|||
/**
|
||||
* Overrides DboSource::renderStatement to handle schema generation with Postgres-style indexes
|
||||
*
|
||||
* @param string $type
|
||||
* @param array $data
|
||||
* @param string $type The query type.
|
||||
* @param array $data The array of data to render.
|
||||
* @return string
|
||||
*/
|
||||
public function renderStatement($type, $data) {
|
||||
|
|
|
@ -166,7 +166,7 @@ class Sqlserver extends DboSource {
|
|||
/**
|
||||
* Returns an array of sources (tables) in the database.
|
||||
*
|
||||
* @param mixed $data
|
||||
* @param mixed $data The names
|
||||
* @return array Array of table names in the database
|
||||
*/
|
||||
public function listSources($data = null) {
|
||||
|
@ -269,10 +269,10 @@ class Sqlserver extends DboSource {
|
|||
/**
|
||||
* Generates the fields list of an SQL query.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param Model $model The model to get fields for.
|
||||
* @param string $alias Alias table name
|
||||
* @param array $fields
|
||||
* @param boolean $quote
|
||||
* @param array $fields The fields so far.
|
||||
* @param boolean $quote Whether or not to quote identfiers.
|
||||
* @return array
|
||||
*/
|
||||
public function fields(Model $model, $alias = null, $fields = array(), $quote = true) {
|
||||
|
@ -338,9 +338,9 @@ class Sqlserver extends DboSource {
|
|||
* Removes Identity (primary key) column from update data before returning to parent, if
|
||||
* value is empty.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param array $fields
|
||||
* @param array $values
|
||||
* @param Model $model The model to insert into.
|
||||
* @param array $fields The fields to set.
|
||||
* @param array $values The values to set.
|
||||
* @return array
|
||||
*/
|
||||
public function create(Model $model, $fields = null, $values = null) {
|
||||
|
@ -367,10 +367,10 @@ class Sqlserver extends DboSource {
|
|||
* Generates and executes an SQL UPDATE statement for given model, fields, and values.
|
||||
* Removes Identity (primary key) column from update data before returning to parent.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param array $fields
|
||||
* @param array $values
|
||||
* @param mixed $conditions
|
||||
* @param Model $model The model to update.
|
||||
* @param array $fields The fields to set.
|
||||
* @param array $values The values to set.
|
||||
* @param mixed $conditions The conditions to use.
|
||||
* @return array
|
||||
*/
|
||||
public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
|
||||
|
@ -482,7 +482,7 @@ class Sqlserver extends DboSource {
|
|||
/**
|
||||
* Builds a map of the columns contained in a result
|
||||
*
|
||||
* @param PDOStatement $results
|
||||
* @param PDOStatement $results The result to modify.
|
||||
* @return void
|
||||
*/
|
||||
public function resultSet($results) {
|
||||
|
@ -608,9 +608,9 @@ class Sqlserver extends DboSource {
|
|||
* Returns an array of all result rows for a given SQL query.
|
||||
* Returns false if no rows matched.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param array $queryData
|
||||
* @param integer $recursive
|
||||
* @param Model $model The model to read from
|
||||
* @param array $queryData The query data
|
||||
* @param integer $recursive How many layers to go.
|
||||
* @return array|false Array of resultset rows, or false if no rows matched
|
||||
*/
|
||||
public function read(Model $model, $queryData = array(), $recursive = null) {
|
||||
|
@ -647,9 +647,9 @@ class Sqlserver extends DboSource {
|
|||
/**
|
||||
* Inserts multiple values into a table
|
||||
*
|
||||
* @param string $table
|
||||
* @param string $fields
|
||||
* @param array $values
|
||||
* @param string $table The table to insert into.
|
||||
* @param string $fields The fields to set.
|
||||
* @param array $values The values to set.
|
||||
* @return void
|
||||
*/
|
||||
public function insertMulti($table, $fields, $values) {
|
||||
|
@ -699,8 +699,8 @@ class Sqlserver extends DboSource {
|
|||
/**
|
||||
* Format indexes for create table
|
||||
*
|
||||
* @param array $indexes
|
||||
* @param string $table
|
||||
* @param array $indexes The indexes to build
|
||||
* @param string $table The table to make indexes for.
|
||||
* @return string
|
||||
*/
|
||||
public function buildIndex($indexes, $table = null) {
|
||||
|
@ -744,7 +744,7 @@ class Sqlserver extends DboSource {
|
|||
* Returns number of affected rows in previous database operation. If no previous operation exists,
|
||||
* this returns false.
|
||||
*
|
||||
* @param mixed $source
|
||||
* @param mixed $source Unused
|
||||
* @return integer Number of affected rows
|
||||
*/
|
||||
public function lastAffected($source = null) {
|
||||
|
|
|
@ -1063,7 +1063,7 @@ class Model extends Object implements CakeEventListener {
|
|||
* Build an array-based association from string.
|
||||
*
|
||||
* @param string $type 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'
|
||||
* @param string $assocKey
|
||||
* @param string $assocKey Association key.
|
||||
* @return void
|
||||
*/
|
||||
protected function _generateAssociation($type, $assocKey) {
|
||||
|
@ -1214,7 +1214,7 @@ class Model extends Object implements CakeEventListener {
|
|||
/**
|
||||
* Move values to alias
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data Data.
|
||||
* @return array
|
||||
*/
|
||||
protected function _setAliasData($data) {
|
||||
|
@ -1939,7 +1939,7 @@ class Model extends Object implements CakeEventListener {
|
|||
*
|
||||
* @param array $joined Data to save
|
||||
* @param integer|string $id ID of record in this model
|
||||
* @param DataSource $db
|
||||
* @param DataSource $db Datasource instance.
|
||||
* @return void
|
||||
*/
|
||||
protected function _saveMulti($joined, $id, $db) {
|
||||
|
@ -2332,7 +2332,7 @@ class Model extends Object implements CakeEventListener {
|
|||
* If you do not want this to happen, make a copy of `$data` before passing it
|
||||
* to this method
|
||||
*
|
||||
* @param array $data Record data to validate. This should be a numerically-indexed array
|
||||
* @param array &$data Record data to validate. This should be a numerically-indexed array
|
||||
* @param array $options Options to use when validating record data (see above), See also $options of validates().
|
||||
* @return boolean|array If atomic: True on success, or false on failure.
|
||||
* Otherwise: array similar to the $data array passed, but values are set to true/false
|
||||
|
@ -2532,7 +2532,7 @@ class Model extends Object implements CakeEventListener {
|
|||
* Helper method for saveAll() and friends, to add foreign key to fieldlist
|
||||
*
|
||||
* @param string $key fieldname to be added to list
|
||||
* @param array $options
|
||||
* @param array $options Options list
|
||||
* @return array $options
|
||||
*/
|
||||
protected function _addToWhiteList($key, $options) {
|
||||
|
@ -2567,7 +2567,7 @@ class Model extends Object implements CakeEventListener {
|
|||
* If you do not want this to happen, make a copy of `$data` before passing it
|
||||
* to this method
|
||||
*
|
||||
* @param array $data Record data to validate. This should be an array indexed by association name.
|
||||
* @param array &$data Record data to validate. This should be an array indexed by association name.
|
||||
* @param array $options Options to use when validating record data (see above), See also $options of validates().
|
||||
* @return array|boolean If atomic: True on success, or false on failure.
|
||||
* Otherwise: array similar to the $data array passed, but values are set to true/false
|
||||
|
@ -2791,7 +2791,7 @@ class Model extends Object implements CakeEventListener {
|
|||
/**
|
||||
* Collects foreign keys from associations.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type Association type.
|
||||
* @return array
|
||||
*/
|
||||
protected function _collectForeignKeys($type = 'belongsTo') {
|
||||
|
@ -3017,8 +3017,8 @@ class Model extends Object implements CakeEventListener {
|
|||
* Handles the before/after filter logic for find('all') operations. Only called by Model::find().
|
||||
*
|
||||
* @param string $state Either "before" or "after"
|
||||
* @param array $query
|
||||
* @param array $results
|
||||
* @param array $query Query.
|
||||
* @param array $results Results.
|
||||
* @return array
|
||||
* @see Model::find()
|
||||
*/
|
||||
|
@ -3034,8 +3034,8 @@ class Model extends Object implements CakeEventListener {
|
|||
* Handles the before/after filter logic for find('first') operations. Only called by Model::find().
|
||||
*
|
||||
* @param string $state Either "before" or "after"
|
||||
* @param array $query
|
||||
* @param array $results
|
||||
* @param array $query Query.
|
||||
* @param array $results Results.
|
||||
* @return array
|
||||
* @see Model::find()
|
||||
*/
|
||||
|
@ -3056,8 +3056,8 @@ class Model extends Object implements CakeEventListener {
|
|||
* Handles the before/after filter logic for find('count') operations. Only called by Model::find().
|
||||
*
|
||||
* @param string $state Either "before" or "after"
|
||||
* @param array $query
|
||||
* @param array $results
|
||||
* @param array $query Query.
|
||||
* @param array $results Results.
|
||||
* @return integer The number of records found, or false
|
||||
* @see Model::find()
|
||||
*/
|
||||
|
@ -3108,8 +3108,8 @@ class Model extends Object implements CakeEventListener {
|
|||
* Handles the before/after filter logic for find('list') operations. Only called by Model::find().
|
||||
*
|
||||
* @param string $state Either "before" or "after"
|
||||
* @param array $query
|
||||
* @param array $results
|
||||
* @param array $query Query.
|
||||
* @param array $results Results.
|
||||
* @return array Key/value pairs of primary keys/display field values of all records found
|
||||
* @see Model::find()
|
||||
*/
|
||||
|
@ -3169,8 +3169,8 @@ class Model extends Object implements CakeEventListener {
|
|||
* rows and return them.
|
||||
*
|
||||
* @param string $state Either "before" or "after"
|
||||
* @param array $query
|
||||
* @param array $results
|
||||
* @param array $query Query.
|
||||
* @param array $results Results.
|
||||
* @return array
|
||||
*/
|
||||
protected function _findNeighbors($state, $query, $results = array()) {
|
||||
|
@ -3230,9 +3230,9 @@ class Model extends Object implements CakeEventListener {
|
|||
* In the event of ambiguous results returned (multiple top level results, with different parent_ids)
|
||||
* top level results with different parent_ids to the first result will be dropped
|
||||
*
|
||||
* @param string $state
|
||||
* @param mixed $query
|
||||
* @param array $results
|
||||
* @param string $state Either "before" or "after".
|
||||
* @param array $query Query.
|
||||
* @param array $results Results.
|
||||
* @return array Threaded results
|
||||
*/
|
||||
protected function _findThreaded($state, $query, $results = array()) {
|
||||
|
@ -3342,11 +3342,14 @@ class Model extends Object implements CakeEventListener {
|
|||
/**
|
||||
* Returns a resultset for a given SQL statement. Custom SQL queries should be performed with this method.
|
||||
*
|
||||
* @param string $sql SQL statement
|
||||
* @param boolean|array $params Either a boolean to control query caching or an array of parameters
|
||||
* The method can options 2nd and 3rd parameters.
|
||||
*
|
||||
* - 2nd param: Either a boolean to control query caching or an array of parameters
|
||||
* for use with prepared statement placeholders.
|
||||
* @param boolean $cache If $params is provided, a boolean flag for enabling/disabled
|
||||
* query caching.
|
||||
* - 3rd param: If 2nd argument is provided, a boolean flag for enabling/disabled
|
||||
* query caching.
|
||||
*
|
||||
* @param string $sql SQL statement
|
||||
* @return mixed Resultset array or boolean indicating success / failure depending on the query executed
|
||||
* @link http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-query
|
||||
*/
|
||||
|
@ -3770,7 +3773,7 @@ class Model extends Object implements CakeEventListener {
|
|||
/**
|
||||
* Returns an instance of a model validator for this class
|
||||
*
|
||||
* @param ModelValidator Model validator instance.
|
||||
* @param ModelValidator $instance Model validator instance.
|
||||
* If null a new ModelValidator instance will be made using current model object
|
||||
* @return ModelValidator
|
||||
*/
|
||||
|
|
|
@ -33,7 +33,7 @@ abstract class AbstractTransport {
|
|||
/**
|
||||
* Send mail
|
||||
*
|
||||
* @param CakeEmail $email
|
||||
* @param CakeEmail $email CakeEmail instance.
|
||||
* @return array
|
||||
*/
|
||||
abstract public function send(CakeEmail $email);
|
||||
|
@ -41,7 +41,7 @@ abstract class AbstractTransport {
|
|||
/**
|
||||
* Set the config
|
||||
*
|
||||
* @param array $config
|
||||
* @param array $config Configuration options.
|
||||
* @return array Returns configs
|
||||
*/
|
||||
public function config($config = null) {
|
||||
|
@ -55,7 +55,7 @@ abstract class AbstractTransport {
|
|||
* Help to convert headers in string
|
||||
*
|
||||
* @param array $headers Headers in format key => value
|
||||
* @param string $eol
|
||||
* @param string $eol End of line string.
|
||||
* @return string
|
||||
*/
|
||||
protected function _headersToString($headers, $eol = "\r\n") {
|
||||
|
|
|
@ -353,8 +353,9 @@ class CakeEmail {
|
|||
/**
|
||||
* From
|
||||
*
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -368,8 +369,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Sender
|
||||
*
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -383,8 +385,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Reply-To
|
||||
*
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -398,8 +401,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Read Receipt (Disposition-Notification-To header)
|
||||
*
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -413,8 +417,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Return Path
|
||||
*
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -428,8 +433,9 @@ class CakeEmail {
|
|||
/**
|
||||
* To
|
||||
*
|
||||
* @param string|array $email Null to get, String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
*/
|
||||
public function to($email = null, $name = null) {
|
||||
|
@ -442,8 +448,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Add To
|
||||
*
|
||||
* @param string|array $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function addTo($email, $name = null) {
|
||||
|
@ -453,8 +460,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Cc
|
||||
*
|
||||
* @param string|array $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
*/
|
||||
public function cc($email = null, $name = null) {
|
||||
|
@ -467,8 +475,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Add Cc
|
||||
*
|
||||
* @param string|array $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function addCc($email, $name = null) {
|
||||
|
@ -478,8 +487,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Bcc
|
||||
*
|
||||
* @param string|array $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return array|CakeEmail
|
||||
*/
|
||||
public function bcc($email = null, $name = null) {
|
||||
|
@ -492,8 +502,9 @@ class CakeEmail {
|
|||
/**
|
||||
* Add Bcc
|
||||
*
|
||||
* @param string|array $email String with email, Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name
|
||||
* @param string|array $email Null to get, String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
public function addBcc($email, $name = null) {
|
||||
|
@ -503,7 +514,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Charset setter/getter
|
||||
*
|
||||
* @param string $charset
|
||||
* @param string $charset Character set.
|
||||
* @return string $this->charset
|
||||
*/
|
||||
public function charset($charset = null) {
|
||||
|
@ -520,7 +531,7 @@ class CakeEmail {
|
|||
/**
|
||||
* HeaderCharset setter/getter
|
||||
*
|
||||
* @param string $charset
|
||||
* @param string $charset Character set.
|
||||
* @return string $this->charset
|
||||
*/
|
||||
public function headerCharset($charset = null) {
|
||||
|
@ -547,9 +558,10 @@ class CakeEmail {
|
|||
/**
|
||||
* Set email
|
||||
*
|
||||
* @param string $varName
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string $varName Property name
|
||||
* @param string|array $email String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return CakeEmail $this
|
||||
*/
|
||||
protected function _setEmail($varName, $email, $name) {
|
||||
|
@ -576,7 +588,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Validate email address
|
||||
*
|
||||
* @param string $email
|
||||
* @param string $email Email
|
||||
* @return void
|
||||
* @throws SocketException If email address does not validate
|
||||
*/
|
||||
|
@ -593,10 +605,11 @@ class CakeEmail {
|
|||
/**
|
||||
* Set only 1 email
|
||||
*
|
||||
* @param string $varName
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string $throwMessage
|
||||
* @param string $varName Property name
|
||||
* @param string|array $email String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @param string $throwMessage Exception message
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -613,9 +626,10 @@ class CakeEmail {
|
|||
/**
|
||||
* Add email
|
||||
*
|
||||
* @param string $varName
|
||||
* @param string|array $email
|
||||
* @param string $name
|
||||
* @param string $varName Property name
|
||||
* @param string|array $email String with email,
|
||||
* Array with email as key, name as value or email as value (without name)
|
||||
* @param string $name Name
|
||||
* @return CakeEmail $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -643,7 +657,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Get/Set Subject.
|
||||
*
|
||||
* @param string $subject
|
||||
* @param string $subject Subject string.
|
||||
* @return string|CakeEmail
|
||||
*/
|
||||
public function subject($subject = null) {
|
||||
|
@ -672,7 +686,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Add header for the message
|
||||
*
|
||||
* @param array $headers
|
||||
* @param array $headers Headers to set.
|
||||
* @return object $this
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -698,14 +712,19 @@ class CakeEmail {
|
|||
* - `bcc`
|
||||
* - `subject`
|
||||
*
|
||||
* @param array $include
|
||||
* @param array $include List of headers.
|
||||
* @return array
|
||||
*/
|
||||
public function getHeaders($include = array()) {
|
||||
if ($include == array_values($include)) {
|
||||
$include = array_fill_keys($include, true);
|
||||
}
|
||||
$defaults = array_fill_keys(array('from', 'sender', 'replyTo', 'readReceipt', 'returnPath', 'to', 'cc', 'bcc', 'subject'), false);
|
||||
$defaults = array_fill_keys(
|
||||
array(
|
||||
'from', 'sender', 'replyTo', 'readReceipt', 'returnPath',
|
||||
'to', 'cc', 'bcc', 'subject'),
|
||||
false
|
||||
);
|
||||
$include += $defaults;
|
||||
|
||||
$headers = array();
|
||||
|
@ -777,7 +796,7 @@ class CakeEmail {
|
|||
* be quoted as characters like `:` and `,` are known to cause issues
|
||||
* in address header fields.
|
||||
*
|
||||
* @param array $address
|
||||
* @param array $address Addresses to format.
|
||||
* @return array
|
||||
*/
|
||||
protected function _formatAddress($address) {
|
||||
|
@ -820,7 +839,7 @@ class CakeEmail {
|
|||
/**
|
||||
* View class for render
|
||||
*
|
||||
* @param string $viewClass
|
||||
* @param string $viewClass View class name.
|
||||
* @return string|CakeEmail
|
||||
*/
|
||||
public function viewRender($viewClass = null) {
|
||||
|
@ -834,7 +853,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Variables to be set on render
|
||||
*
|
||||
* @param array $viewVars
|
||||
* @param array $viewVars Variables to set for view.
|
||||
* @return array|CakeEmail
|
||||
*/
|
||||
public function viewVars($viewVars = null) {
|
||||
|
@ -848,7 +867,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Theme to use when rendering
|
||||
*
|
||||
* @param string $theme
|
||||
* @param string $theme Theme name.
|
||||
* @return string|CakeEmail
|
||||
*/
|
||||
public function theme($theme = null) {
|
||||
|
@ -862,7 +881,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Helpers to be used in render
|
||||
*
|
||||
* @param array $helpers
|
||||
* @param array $helpers Helpers list.
|
||||
* @return array|CakeEmail
|
||||
*/
|
||||
public function helpers($helpers = null) {
|
||||
|
@ -876,7 +895,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Email format
|
||||
*
|
||||
* @param string $format
|
||||
* @param string $format Formatting string.
|
||||
* @return string|CakeEmail
|
||||
* @throws SocketException
|
||||
*/
|
||||
|
@ -894,7 +913,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Transport name
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name Transport name.
|
||||
* @return string|CakeEmail
|
||||
*/
|
||||
public function transport($name = null) {
|
||||
|
@ -1185,7 +1204,7 @@ class CakeEmail {
|
|||
/**
|
||||
* Apply the config to an instance
|
||||
*
|
||||
* @param array $config
|
||||
* @param array $config Configuration options.
|
||||
* @return void
|
||||
* @throws ConfigureException When configuration file cannot be found, or is missing
|
||||
* the named config.
|
||||
|
|
|
@ -104,7 +104,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
/**
|
||||
* Set the configuration
|
||||
*
|
||||
* @param array $config
|
||||
* @param array $config Configuration options.
|
||||
* @return array Returns configs
|
||||
*/
|
||||
public function config($config = null) {
|
||||
|
@ -127,7 +127,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
/**
|
||||
* Parses and stores the reponse lines in `'code' => 'message'` format.
|
||||
*
|
||||
* @param array $responseLines
|
||||
* @param array $responseLines Response lines to parse.
|
||||
* @return void
|
||||
*/
|
||||
protected function _bufferResponseLines(array $responseLines) {
|
||||
|
|
|
@ -71,7 +71,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* If no TestResult object is passed a new one will be created.
|
||||
* This method is run for each test method in this class
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result The test result object
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
|
@ -107,8 +107,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* Overrides SimpleTestCase::skipIf to provide a boolean return value
|
||||
*
|
||||
* @param boolean $shouldSkip
|
||||
* @param string $message
|
||||
* @param boolean $shouldSkip Whether or not the test should be skipped.
|
||||
* @param string $message The message to display.
|
||||
* @return boolean
|
||||
*/
|
||||
public function skipIf($shouldSkip, $message = '') {
|
||||
|
@ -196,8 +196,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* Chooses which fixtures to load for a given test
|
||||
*
|
||||
* @param string $fixture Each parameter is a model name that corresponds to a
|
||||
* fixture, i.e. 'Post', 'Author', etc.
|
||||
* Each parameter is a model name that corresponds to a fixture, i.e. 'Post', 'Author', etc.
|
||||
*
|
||||
* @return void
|
||||
* @see CakeTestCase::$autoFixtures
|
||||
* @throws Exception when no fixture manager is available.
|
||||
|
@ -218,7 +218,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
*
|
||||
* @param string $expected The expected value.
|
||||
* @param string $result The actual value.
|
||||
* @param message The message to use for failure.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextNotEquals($expected, $result, $message = '') {
|
||||
|
@ -233,7 +233,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
*
|
||||
* @param string $expected The expected value.
|
||||
* @param string $result The actual value.
|
||||
* @param message The message to use for failure.
|
||||
* @param string $message message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextEquals($expected, $result, $message = '') {
|
||||
|
@ -246,9 +246,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string starts with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $prefix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $prefix The prefix to check for.
|
||||
* @param string $string The string to search in.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextStartsWith($prefix, $string, $message = '') {
|
||||
|
@ -261,9 +261,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string starts not with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $prefix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $prefix The prefix to not find.
|
||||
* @param string $string The string to search.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextStartsNotWith($prefix, $string, $message = '') {
|
||||
|
@ -276,9 +276,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string ends with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $suffix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $suffix The suffix to find.
|
||||
* @param string $string The string to search.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextEndsWith($suffix, $string, $message = '') {
|
||||
|
@ -291,9 +291,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string ends not with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $suffix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $suffix The suffix to not find.
|
||||
* @param string $string The string to search.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextEndsNotWith($suffix, $string, $message = '') {
|
||||
|
@ -306,10 +306,10 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Assert that a string contains another string, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $needle
|
||||
* @param string $haystack
|
||||
* @param string $message
|
||||
* @param boolean $ignoreCase
|
||||
* @param string $needle The string to search for.
|
||||
* @param string $haystack The string to search through.
|
||||
* @param string $message The message to display on failure.
|
||||
* @param boolean $ignoreCase Whether or not the search should be case-sensitive.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextContains($needle, $haystack, $message = '', $ignoreCase = false) {
|
||||
|
@ -322,10 +322,10 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Assert that a text doesn't contain another text, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $needle
|
||||
* @param string $haystack
|
||||
* @param string $message
|
||||
* @param boolean $ignoreCase
|
||||
* @param string $needle The string to search for.
|
||||
* @param string $haystack The string to search through.
|
||||
* @param string $message The message to display on failure.
|
||||
* @param boolean $ignoreCase Whether or not the search should be case-sensitive.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextNotContains($needle, $haystack, $message = '', $ignoreCase = false) {
|
||||
|
@ -373,7 +373,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
*
|
||||
* @param string $string An HTML/XHTML/XML string
|
||||
* @param array $expected An array, see above
|
||||
* @param string $message SimpleTest failure output string
|
||||
* @param string $fullDebug Whether or not more verbose output should be used.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTags($string, $expected, $fullDebug = false) {
|
||||
|
@ -712,9 +712,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* Mock a model, maintain fixtures and table association
|
||||
*
|
||||
* @param string $model
|
||||
* @param mixed $methods
|
||||
* @param array $config
|
||||
* @param string $model The model to get a mock for.
|
||||
* @param mixed $methods The list of methods to mock
|
||||
* @param array $config The config data for the mock's constructor.
|
||||
* @throws MissingModelException
|
||||
* @return Model
|
||||
*/
|
||||
|
|
|
@ -30,8 +30,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Load a file and find the first test case / suite in that file.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param string $params
|
||||
* @param string $filePath The file path to load
|
||||
* @param string $params Additional parameters
|
||||
* @return ReflectionClass
|
||||
*/
|
||||
public function load($filePath, $params = '') {
|
||||
|
@ -42,8 +42,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Convert path fragments used by CakePHP's test runner to absolute paths that can be fed to PHPUnit.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param string $params
|
||||
* @param string $filePath The file path to load
|
||||
* @param string $params Additional parameters
|
||||
* @return void
|
||||
*/
|
||||
protected function _resolveTestFile($filePath, $params) {
|
||||
|
@ -55,7 +55,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Generates the base path to a set of tests based on the parameters.
|
||||
*
|
||||
* @param array $params
|
||||
* @param array $params The path parameters.
|
||||
* @return string The base path.
|
||||
*/
|
||||
protected static function _basePath($params) {
|
||||
|
@ -81,7 +81,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Get the list of files for the test listing.
|
||||
*
|
||||
* @param string $params
|
||||
* @param string $params Path parameters
|
||||
* @return array
|
||||
*/
|
||||
public static function generateTestList($params) {
|
||||
|
|
|
@ -29,7 +29,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
/**
|
||||
* Lets us pass in some options needed for CakePHP's webrunner.
|
||||
*
|
||||
* @param mixed $loader
|
||||
* @param mixed $loader The test suite loader
|
||||
* @param array $params list of options to be used for this run
|
||||
*/
|
||||
public function __construct($loader, $params) {
|
||||
|
@ -40,8 +40,8 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
/**
|
||||
* Actually run a suite of tests. Cake initializes fixtures here using the chosen fixture manager
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $suite
|
||||
* @param array $arguments
|
||||
* @param PHPUnit_Framework_Test $suite The test suite to run
|
||||
* @param array $arguments The CLI arguments
|
||||
* @return void
|
||||
*/
|
||||
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) {
|
||||
|
@ -85,7 +85,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
/**
|
||||
* Get the fixture manager class specified or use the default one.
|
||||
*
|
||||
* @param array $arguments
|
||||
* @param array $arguments The CLI arguments.
|
||||
* @return mixed instance of a fixture manager.
|
||||
* @throws RuntimeException When fixture manager class cannot be loaded.
|
||||
*/
|
||||
|
|
|
@ -35,7 +35,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
|
|||
/**
|
||||
* Construct method
|
||||
*
|
||||
* @param mixed $loader
|
||||
* @param mixed $loader The loader instance to use.
|
||||
* @param array $params list of options to be used for this run
|
||||
* @throws MissingTestLoaderException When a loader class could not be found.
|
||||
*/
|
||||
|
@ -55,8 +55,8 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
|
|||
/**
|
||||
* Ugly hack to get around PHPUnit having a hard coded class name for the Runner. :(
|
||||
*
|
||||
* @param array $argv
|
||||
* @param boolean $exit
|
||||
* @param array $argv The command arguments
|
||||
* @param boolean $exit The exit mode.
|
||||
* @return void
|
||||
*/
|
||||
public function run(array $argv, $exit = true) {
|
||||
|
@ -131,7 +131,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
|
|||
/**
|
||||
* Handles output flag used to change printing on webrunner.
|
||||
*
|
||||
* @param string $reporter
|
||||
* @param string $reporter The reporter class to use.
|
||||
* @return void
|
||||
*/
|
||||
public function handleReporter($reporter) {
|
||||
|
|
|
@ -48,6 +48,8 @@ class ControllerTestDispatcher extends Dispatcher {
|
|||
/**
|
||||
* Returns the test controller
|
||||
*
|
||||
* @param CakeRequest $request The request instance.
|
||||
* @param CakeResponse $response The response instance.
|
||||
* @return Controller
|
||||
*/
|
||||
protected function _getController($request, $response) {
|
||||
|
|
|
@ -134,8 +134,8 @@ abstract class BaseCoverageReport {
|
|||
* 3.5 uses -1 for uncovered, and -2 for dead.
|
||||
* 3.6 uses array() for uncovered and null for dead.
|
||||
*
|
||||
* @param array $fileLines
|
||||
* @param array $coverageData
|
||||
* @param array $fileLines The lines in the file.
|
||||
* @param array $coverageData The raw coverage data.
|
||||
* @return array Array of covered, total lines.
|
||||
*/
|
||||
protected function _calculateCoveredLines($fileLines, $coverageData) {
|
||||
|
|
|
@ -127,7 +127,7 @@ HTML;
|
|||
/**
|
||||
* Guess the class name the test was for based on the test case filename.
|
||||
*
|
||||
* @param ReflectionClass $testReflection.
|
||||
* @param ReflectionClass $testReflection The class to reflect
|
||||
* @return string Possible test subject name.
|
||||
*/
|
||||
protected function _guessSubjectName($testReflection) {
|
||||
|
@ -143,10 +143,10 @@ HTML;
|
|||
/**
|
||||
* Renders the HTML for a single line in the HTML diff.
|
||||
*
|
||||
* @param string $line
|
||||
* @param integer $linenumber
|
||||
* @param string $class
|
||||
* @param array $coveringTests
|
||||
* @param string $line The line content.
|
||||
* @param integer $linenumber The line number
|
||||
* @param string $class The classname to use.
|
||||
* @param array $coveringTests The tests covering the line.
|
||||
* @return string
|
||||
*/
|
||||
protected function _paintLine($line, $linenumber, $class, $coveringTests) {
|
||||
|
@ -195,8 +195,8 @@ HTML;
|
|||
/**
|
||||
* Generate an HTML snippet for coverage headers
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $percent
|
||||
* @param string $filename The file name being covered
|
||||
* @param string $percent The percentage covered
|
||||
* @return string
|
||||
*/
|
||||
public function coverageHeader($filename, $percent) {
|
||||
|
|
|
@ -44,10 +44,10 @@ class CakeTestModel extends Model {
|
|||
/**
|
||||
* Overriding save() to set CakeTestSuiteDispatcher::date() as formatter for created, modified and updated fields
|
||||
*
|
||||
* @param array $data
|
||||
* @param boolean|array $validate
|
||||
* @param array $fieldList
|
||||
* @return void
|
||||
* @param array $data Data to save
|
||||
* @param boolean|array $validate Validate or options.
|
||||
* @param array $fieldList Whitelist of fields
|
||||
* @return mixed
|
||||
*/
|
||||
public function save($data = null, $validate = true, $fieldList = array()) {
|
||||
$db = $this->getDataSource();
|
||||
|
|
|
@ -121,7 +121,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* Print result
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result The result object
|
||||
* @return void
|
||||
*/
|
||||
public function printResult(PHPUnit_Framework_TestResult $result) {
|
||||
|
@ -131,7 +131,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* Paint result
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result The result object
|
||||
* @return void
|
||||
*/
|
||||
public function paintResult(PHPUnit_Framework_TestResult $result) {
|
||||
|
@ -141,9 +141,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* An error occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
* @param PHPUnit_Framework_Test $test The test to add an error for.
|
||||
* @param Exception $e The exception object to add.
|
||||
* @param float $time The current time.
|
||||
* @return void
|
||||
*/
|
||||
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
||||
|
@ -153,9 +153,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* A failure occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_AssertionFailedError $e
|
||||
* @param float $time
|
||||
* @param PHPUnit_Framework_Test $test The test that failed
|
||||
* @param PHPUnit_Framework_AssertionFailedError $e The assertion that failed.
|
||||
* @param float $time The current time.
|
||||
* @return void
|
||||
*/
|
||||
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
|
||||
|
@ -165,9 +165,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* Incomplete test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
* @param PHPUnit_Framework_Test $test The test that was incomplete.
|
||||
* @param Exception $e The incomplete exception
|
||||
* @param float $time The current time.
|
||||
* @return void
|
||||
*/
|
||||
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
||||
|
@ -177,9 +177,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* Skipped test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
* @param PHPUnit_Framework_Test $test The test that failed.
|
||||
* @param Exception $e The skip object.
|
||||
* @param float $time The current time.
|
||||
* @return void
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
||||
|
@ -189,7 +189,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
* @param PHPUnit_Framework_TestSuite $suite The suite to start
|
||||
* @return void
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
|
||||
|
@ -202,7 +202,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* A test suite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
* @param PHPUnit_Framework_TestSuite $suite The suite that ended.
|
||||
* @return void
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
|
||||
|
@ -211,7 +211,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* A test started.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_Test $test The test that started.
|
||||
* @return void
|
||||
*/
|
||||
public function startTest(PHPUnit_Framework_Test $test) {
|
||||
|
@ -220,8 +220,8 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* A test ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param float $time
|
||||
* @param PHPUnit_Framework_Test $test The test that ended
|
||||
* @param float $time The current time.
|
||||
* @return void
|
||||
*/
|
||||
public function endTest(PHPUnit_Framework_Test $test, $time) {
|
||||
|
|
|
@ -169,7 +169,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
/**
|
||||
* Paints a code coverage report.
|
||||
*
|
||||
* @param array $coverage
|
||||
* @param array $coverage The coverage data
|
||||
* @return void
|
||||
*/
|
||||
public function paintCoverage(array $coverage) {
|
||||
|
@ -243,7 +243,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
*
|
||||
* @param PHPUnit_Framework_AssertionFailedError $message Failure object displayed in
|
||||
* the context of the other tests.
|
||||
* @param mixed $test
|
||||
* @param mixed $test The test case to paint a failure for.
|
||||
* @return void
|
||||
*/
|
||||
public function paintFail($message, $test) {
|
||||
|
@ -278,7 +278,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
* trail of the nesting test suites below the
|
||||
* top level test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test test method that just passed
|
||||
* @param PHPUnit_Framework_Test $test Test method that just passed
|
||||
* @param float $time time spent to run the test method
|
||||
* @return void
|
||||
*/
|
||||
|
@ -295,8 +295,8 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
/**
|
||||
* Paints a PHP exception.
|
||||
*
|
||||
* @param Exception $exception Exception to display.
|
||||
* @param mixed $test
|
||||
* @param Exception $message Exception to display.
|
||||
* @param mixed $test The test that failed.
|
||||
* @return void
|
||||
*/
|
||||
public function paintException($message, $test) {
|
||||
|
@ -370,7 +370,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
/**
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
* @param PHPUnit_Framework_TestSuite $suite The test suite to start.
|
||||
* @return void
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
|
||||
|
|
|
@ -184,7 +184,7 @@ class Sanitize {
|
|||
*
|
||||
* Will remove all `<b>`, `<p>`, and `<div>` tags from the $dirty string.
|
||||
*
|
||||
* @param string $str,... String to sanitize
|
||||
* @param string $str String to sanitize.
|
||||
* @return string sanitized String
|
||||
*/
|
||||
public static function stripTags($str) {
|
||||
|
|
|
@ -120,7 +120,7 @@ class Set {
|
|||
* returned object (recursively). If $key is numeric will maintain array
|
||||
* structure
|
||||
*
|
||||
* @param array $array Array to map
|
||||
* @param array &$array Array to map
|
||||
* @param string $class Class name
|
||||
* @param boolean $primary whether to assign first array key as the _name_
|
||||
* @return mixed Mapped object
|
||||
|
@ -458,7 +458,7 @@ class Set {
|
|||
* @param string|array $conditions An array of condition strings or an XPath expression
|
||||
* @param array $data An array of data to execute the match on
|
||||
* @param integer $i Optional: The 'nth'-number of the item being matched.
|
||||
* @param integer $length
|
||||
* @param integer $length Length.
|
||||
* @return boolean
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/set.html#Set::matches
|
||||
*/
|
||||
|
@ -851,6 +851,7 @@ class Set {
|
|||
|
||||
/**
|
||||
* Converts an object into an array.
|
||||
*
|
||||
* @param object $object Object to reverse
|
||||
* @return array Array representation of given object
|
||||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/set.html#Set::reverse
|
||||
|
@ -926,8 +927,8 @@ class Set {
|
|||
/**
|
||||
* Flattens an array for sorting
|
||||
*
|
||||
* @param array $results
|
||||
* @param string $key
|
||||
* @param array $results Array to flatten.
|
||||
* @param string $key Key.
|
||||
* @return array
|
||||
*/
|
||||
protected static function _flatten($results, $key = null) {
|
||||
|
@ -1026,7 +1027,7 @@ class Set {
|
|||
/**
|
||||
* Takes in a flat array and returns a nested array
|
||||
*
|
||||
* @param mixed $data
|
||||
* @param mixed $data Data
|
||||
* @param array $options Options are:
|
||||
* children - the key name to use in the resultset for children
|
||||
* idPath - the path to a key that identifies each entry
|
||||
|
|
|
@ -253,8 +253,8 @@ class String {
|
|||
* is to replace all whitespace and unneeded markup around placeholders that did not get replaced
|
||||
* by String::insert().
|
||||
*
|
||||
* @param string $str
|
||||
* @param array $options
|
||||
* @param string $str String to clean.
|
||||
* @param array $options Options list.
|
||||
* @return string
|
||||
* @see String::insert()
|
||||
*/
|
||||
|
|
|
@ -2866,17 +2866,7 @@ class FormHelper extends AppHelper {
|
|||
$data = array('am' => 'am', 'pm' => 'pm');
|
||||
break;
|
||||
case 'day':
|
||||
$min = 1;
|
||||
$max = 31;
|
||||
|
||||
if (isset($options['min'])) {
|
||||
$min = $options['min'];
|
||||
}
|
||||
if (isset($options['max'])) {
|
||||
$max = $options['max'];
|
||||
}
|
||||
|
||||
for ($i = $min; $i <= $max; $i++) {
|
||||
for ($i = 1; $i <= 31; $i++) {
|
||||
$data[sprintf('%02d', $i)] = $i;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue