Skip to content
Permalink
Browse files

Fix API doc errors in ORM/

  • Loading branch information...
markstory committed Jul 8, 2014
1 parent 061b5d6 commit a1defb476f3ecd34fa8243634e0653306fc5dc50
@@ -286,7 +286,7 @@ public function foreignKey($key = null) {
*
* If no parameters are passed the current setting is returned.
*
* @param bool $dependent
* @param bool $dependent Set the dependent mode. Use null to read the current state.
* @return bool
*/
public function dependent($dependent = null) {
@@ -326,7 +326,7 @@ public function joinType($type = null) {
* in the source table record.
* If no arguments are passed, the currently configured type is returned.
*
* @param string $name
* @param string $name The name of the association property. Use null to read the current value.
* @return string
*/
public function property($name = null) {
@@ -346,7 +346,7 @@ public function property($name = null) {
* rendering any changes to this setting void.
* If no arguments are passed, the currently configured strategy is returned.
*
* @param string $name
* @param string $name The strategy type. Use null to read the current value.
* @return string
* @throws \InvalidArgumentException When an invalid strategy is provided.
*/
@@ -446,11 +446,11 @@ public function attachTo(Query $query, array $options = []) {
* Correctly nests a result row associated values into the correct array keys inside the
* source results.
*
* @param array $row
* @param array $row The row to transform
* @param string $nestKey The array key under which the results for this association
* should be found
* should be found
* @param bool $joined Whether or not the row is a result of a direct join
* with this association
* with this association
* @return array
*/
public function transformRow($row, $nestKey, $joined) {
@@ -468,9 +468,9 @@ public function transformRow($row, $nestKey, $joined) {
* with the default empty value according to whether the association was
* joined or fetched externally.
*
* @param array $row
* @param array $row The row to set a default on.
* @param bool $joined Whether or not the row is a result of a direct join
* with this association
* with this association
* @return array
*/
public function defaultRowValue($row, $joined) {
@@ -487,8 +487,8 @@ public function defaultRowValue($row, $joined) {
* configuration
*
* @param string|array $type the type of query to perform, if an array is passed,
* it will be interpreted as the `$options` parameter
* @param array $options
* it will be interpreted as the `$options` parameter
* @param array $options The options to for the find
* @see \Cake\ORM\Table::find()
* @return \Cake\ORM\Query
*/
@@ -693,7 +693,7 @@ public function __isset($property) {
* Proxies method calls to the target table.
*
* @param string $method name of the method to be invoked
* @param array $args List of arguments passed to the function
* @param array $argument List of arguments passed to the function
* @return mixed
* @throws \BadMethodCallException
*/
@@ -735,7 +735,7 @@ public function __call($method, $argument) {
* - strategy: The name of strategy to use for finding target table records
* - nestKey: The array key under which results will be found when transforming the row
*
* @param array $options
* @param array $options The options for eager loading.
* @return \Closure
*/
public abstract function eagerLoader(array $options);
@@ -767,7 +767,7 @@ public function __call($method, $argument) {
* the saving operation to the target table.
*
* @param \Cake\ORM\Entity $entity the data to be saved
* @param array|\ArrayObject $options
* @param array|\ArrayObject $options The options for saving associated data.
* @return bool|Entity false if $entity could not be saved, otherwise it returns
* the saved entity
* @see Table::save()
@@ -67,7 +67,7 @@ public function cascadeDelete(Entity $entity, array $options = []) {
* in the source table record.
* If no arguments are passed, currently configured type is returned.
*
* @param string $name
* @param string $name The property name, use null to read the current property.
* @return string
*/
public function property($name = null) {
@@ -411,7 +411,7 @@ public function saveAssociated(Entity $entity, array $options = []) {
*
* @param \Cake\ORM\Entity $parentEntity the source entity containing the target
* entities to be saved.
* @param array|\Traversable list of entities to persist in target table and to
* @param array|\Traversable $entities list of entities to persist in target table and to
* link to the parent entity
* @param array $options list of options accepted by Table::save()
* @throws \InvalidArgumentException if the property representing the association
@@ -777,12 +777,12 @@ protected function _diffLinks($existing, $jointEntities, $targetEntities) {
/**
* Throws an exception should any of the passed entities is not persisted.
*
* @throws \InvalidArgumentException
* @param \Cake\ORM\Entity $sourceEntity the row belonging to the `source` side
* of this association
* of this association
* @param array $targetEntities list of entities belonging to the `target` side
* of this association
* of this association
* @return bool
* @throws \InvalidArgumentException
*/
protected function _checkPersistenceStatus($sourceEntity, array $targetEntities) {
if ($sourceEntity->isNew() !== false) {
@@ -804,10 +804,12 @@ protected function _checkPersistenceStatus($sourceEntity, array $targetEntities)
* Returns the list of joint entities that exist between the source entity
* and each of the passed target entities
*
* @param \Cake\ORM\Entity $sourceEntity
* @param array $targetEntities
* @param \Cake\ORM\Entity $sourceEntity The row belonging to the source side
* of this association.
* @param array $targetEntities The rows belonging to the target side of this
* association.
* @throws \InvalidArgumentException if any of the entities is lacking a primary
* key value
* key value
* @return array
*/
protected function _collectJointEntities($sourceEntity, $targetEntities) {
@@ -859,7 +861,7 @@ protected function _collectJointEntities($sourceEntity, $targetEntities) {
* Appends any conditions required to load the relevant set of records in the
* target table query given a filter key and some filtering values.
*
* @param \Cake\ORM\Query target table's query
* @param \Cake\ORM\Query $query target table's query
* @param string $key the fields that should be used for filtering
* @param mixed $filter the value that should be used to match for $key
* @return \Cake\ORM\Query
@@ -875,7 +877,7 @@ protected function _addFilteringCondition($query, $key, $filter) {
* Generates a string used as a table field that contains the values upon
* which the filter should be applied
*
* @param array $options
* @param array $options the options to use for getting the link field.
* @return string
*/
protected function _linkField($options) {
@@ -914,7 +916,7 @@ protected function _junctionAssociationName() {
* If no arguments are passed the current configured name is returned. A default
* name based of the associated tables will be generated if none found.
*
* @param string $name
* @param string $name The name of the junction table.
* @return string
*/
protected function _junctionTableName($name = null) {
@@ -66,6 +66,7 @@ public function foreignKey($key = null) {
/**
* Sets the sort order in which target records should be returned.
* If no arguments are passed the currently configured value is returned
*
* @param mixed $sort A find() compatible order clause
* @return mixed
*/
@@ -62,7 +62,7 @@ public function foreignKey($key = null) {
* in the source table record.
* If no arguments are passed, currently configured type is returned.
*
* @param string $name
* @param string $name The name of the property. Pass null to read the current value.
* @return string
*/
public function property($name = null) {
@@ -25,7 +25,7 @@ trait SelectableAssociationTrait {
* Returns true if the eager loading process will require a set of parent table's
* primary keys in order to use them as a filter in the finder query.
*
* @param array $options
* @param array $options The options containing the strategy to be used.
* @return bool true if a list of keys will be required
*/
public function requiresKeys(array $options = []) {
@@ -145,7 +145,7 @@ protected function _addFilteringCondition($query, $key, $filter) {
* Generates a string used as a table field that contains the values upon
* which the filter should be applied
*
* @param array $options
* @param array $options The options for getting the link field.
* @return string|array
*/
protected abstract function _linkField($options);
@@ -55,7 +55,7 @@ class BehaviorRegistry extends ObjectRegistry {
/**
* Constructor
*
* @param \Cake\ORM\Table $table
* @param \Cake\ORM\Table $table The table this registry is attached to
*/
public function __construct(Table $table) {
$this->_table = $table;
@@ -81,6 +81,7 @@ protected function _resolveClassName($class) {
*
* @param string $class The classname that is missing.
* @param string $plugin The plugin the behavior is missing in.
* @return void
* @throws \Cake\ORM\Error\MissingBehaviorException
*/
protected function _throwMissingClassError($class, $plugin) {
@@ -120,7 +121,7 @@ protected function _create($class, $alias, $config) {
* Methods starting with `_` will be ignored, as will methods
* declared on Cake\ORM\Behavior
*
* @param \Cake\ORM\Behavior $instance
* @param \Cake\ORM\Behavior $instance The behavior to get methods from.
* @param string $class The classname that is missing.
* @param string $alias The alias of the object.
* @return void
@@ -439,7 +439,7 @@ public function loadExternal($query, $statement) {
*
* @param array $external the list of external associations to be loaded
* @param \Cake\ORM\Query $query The query from which the results where generated
* @param BufferedStatement $statement
* @param BufferedStatement $statement The statement to work on
* @return array
*/
protected function _collectKeys($external, $query, $statement) {
@@ -477,8 +477,8 @@ protected function _collectKeys($external, $query, $statement) {
* Helper function used to iterate an statement and extract the columns
* defined in $collectKeys
*
* @param \Cake\Database\StatementInterface $statement
* @param array $collectKeys
* @param \Cake\Database\StatementInterface $statement The statement to read from.
* @param array $collectKeys The keys to collect
* @return array
*/
protected function _groupKeys($statement, $collectKeys) {
@@ -34,7 +34,7 @@ class EntityValidator {
/**
* Constructor.
*
* @param \Cake\ORM\Table $table
* @param \Cake\ORM\Table $table The table this validator is for
*/
public function __construct(Table $table) {
$this->_table = $table;
@@ -130,8 +130,8 @@ public function many(array $entities, $options = []) {
* If not empty it will construct a default validation object or get one with
* the name passed in the key
*
* @param \Cake\ORM\Entity The entity to validate
* @param \ArrayObject|array $options
* @param \Cake\ORM\Entity $entity The entity to validate
* @param \ArrayObject|array $options The option for processing validation
* @return bool true if the entity is valid, false otherwise
*/
protected function _processValidation($entity, $options) {
@@ -53,7 +53,7 @@ class Marshaller {
/**
* Constructor.
*
* @param \Cake\ORM\Table $table
* @param \Cake\ORM\Table $table The table this marshaller is for.
* @param bool $safe Whether or not this marshaller is in safe mode
*/
public function __construct(Table $table, $safe = false) {
@@ -128,7 +128,7 @@ public function one(array $data, array $include = []) {
/**
* Create a new sub-marshaller and marshal the associated data.
*
* @param \Cake\ORM\Association $assoc
* @param \Cake\ORM\Association $assoc The association to marshall
* @param array $value The data to hydrate
* @param array $include The associations to include.
* @return mixed
@@ -327,8 +327,8 @@ public function mergeMany($entities, array $data, array $include = []) {
/**
* Creates a new sub-marshaller and merges the associated data.
*
* @param \Cake\Datasource\EntityInterface $original
* @param \Cake\ORM\Association $assoc
* @param \Cake\Datasource\EntityInterface $original The original entity
* @param \Cake\ORM\Association $assoc The association to merge
* @param array $value The data to hydrate
* @param array $include The associations to include.
* @return mixed
@@ -354,8 +354,8 @@ protected function _mergeAssociation($original, $assoc, $value, $include) {
* Creates a new sub-marshaller and merges the associated data for a BelongstoMany
* association.
*
* @param \Cake\Datasource\EntityInterface $original
* @param \Cake\ORM\Association $assoc
* @param \Cake\Datasource\EntityInterface $original The original entity
* @param \Cake\ORM\Association $assoc The association to marshall
* @param array $value The data to hydrate
* @param array $include The associations to include.
* @return mixed
@@ -99,8 +99,8 @@ class Query extends DatabaseQuery {
/**
* Constuctor
*
* @param \Cake\Database\Connection $connection
* @param \Cake\ORM\Table $table
* @param \Cake\Database\Connection $connection The connection object
* @param \Cake\ORM\Table $table The table this query is starting on
*/
public function __construct($connection, $table) {
parent::__construct($connection);
@@ -119,7 +119,7 @@ public function __construct($connection, $table) {
*
* This method returns the same query object for chaining.
*
* @param \Cake\ORM\Table $table
* @param \Cake\ORM\Table $table The table to pull types from
* @return $this
*/
public function addDefaultTypes(Table $table) {
@@ -139,7 +139,8 @@ public function addDefaultTypes(Table $table) {
* and storing containments. If called with no arguments, it will return the
* currently configured instance.
*
* @param \Cake\ORM\EagerLoader $instance
* @param \Cake\ORM\EagerLoader $instance The eager loader to use. Pass null
* to get the current eagerloader.
* @return \Cake\ORM\EagerLoader|$this
*/
public function eagerLoader(EagerLoader $instance = null) {
@@ -346,7 +347,7 @@ public function bufferResults($enable = null) {
* If the field is already aliased, then it will not be changed.
* If no $alias is passed, the default table for this query will be used.
*
* @param string $field
* @param string $field The field to alias
* @param string $alias the alias used to prefix the field
* @return array
*/
@@ -374,8 +375,8 @@ public function aliasField($field, $alias = null) {
* Runs `aliasfield()` for each field in the provided list and returns
* the result under a single array.
*
* @param array $fields
* @param string $defaultAlias
* @param array $fields The fields to alias
* @param string $defaultAlias The default alias
* @return array
*/
public function aliasFields($fields, $defaultAlias = null) {
@@ -507,7 +508,7 @@ public function count() {
* The callback will receive as first argument a clone of this query and not this
* query itself.
*
* @param callable $counter
* @param callable $counter The counter value
* @return $this
*/
public function counter($counter) {
@@ -122,7 +122,7 @@ class ResultSet implements Countable, Iterator, Serializable, JsonSerializable {
* Constructor
*
* @param \Cake\ORM\Query $query Query from where results come
* @param \Cake\Database\StatementInterface $statement
* @param \Cake\Database\StatementInterface $statement The statement to fetch from
*/
public function __construct($query, $statement) {
$repository = $query->repository();
@@ -241,6 +241,7 @@ public function serialize() {
* Part of Serializable interface.
*
* @param string $serialized Serialized object
* @return void
*/
public function unserialize($serialized) {
$this->_results = unserialize($serialized);
@@ -431,8 +432,8 @@ protected function _groupResult($row) {
* Casts all values from a row brought from a table to the correct
* PHP type.
*
* @param Table $table
* @param array $values
* @param Table $table The table object
* @param array $values The values to cast
* @return array
*/
protected function _castValues($table, $values) {
Oops, something went wrong.

0 comments on commit a1defb4

Please sign in to comment.
You can’t perform that action at this time.