|
|
@@ -129,9 +129,9 @@ trait EntityTrait {
|
|
|
* Returns whether this entity contains a property named $property
|
|
|
* regardless of if it is empty.
|
|
|
*
|
|
|
- * @see \Cake\ORM\Entity::has()
|
|
|
- * @param string $property
|
|
|
+ * @param string $property The property to check.
|
|
|
* @return bool
|
|
|
+ * @see \Cake\ORM\Entity::has()
|
|
|
*/
|
|
|
public function __isset($property) {
|
|
|
return $this->has($property);
|
|
|
@@ -140,7 +140,7 @@ trait EntityTrait {
|
|
|
/**
|
|
|
* Removes a property from this entity
|
|
|
*
|
|
|
- * @param string $property
|
|
|
+ * @param string $property The property to unset
|
|
|
* @return void
|
|
|
*/
|
|
|
public function __unset($property) {
|
|
|
@@ -273,7 +273,7 @@ trait EntityTrait {
|
|
|
* $entity->has('last_name'); // false
|
|
|
* }}}
|
|
|
*
|
|
|
- * @param string $property
|
|
|
+ * @param string $property The property to check.
|
|
|
* @return bool
|
|
|
*/
|
|
|
public function has($property) {
|
|
|
@@ -289,8 +289,8 @@ trait EntityTrait {
|
|
|
*
|
|
|
* ``$entity->unsetProperty(['name', 'last_name']);``
|
|
|
*
|
|
|
- * @param string|array $property
|
|
|
- * @return \Cake\ORM\
|
|
|
+ * @param string|array $property The property to unset.
|
|
|
+ * @return \Cake\DataSource\EntityInterface
|
|
|
*/
|
|
|
public function unsetProperty($property) {
|
|
|
$property = (array)$property;
|
|
|
@@ -307,7 +307,7 @@ trait EntityTrait {
|
|
|
* If the properties argument is null, the currently hidden properties
|
|
|
* will be returned. Otherwise the hidden properties will be set.
|
|
|
*
|
|
|
- * @param null|array Either an array of properties to hide or null to get properties
|
|
|
+ * @param null|array $properties Either an array of properties to hide or null to get properties
|
|
|
* @return array|\Cake\DataSource\EntityInterface
|
|
|
*/
|
|
|
public function hiddenProperties($properties = null) {
|
|
|
@@ -324,7 +324,7 @@ trait EntityTrait {
|
|
|
* If the properties argument is null, the currently virtual properties
|
|
|
* will be returned. Otherwise the virtual properties will be set.
|
|
|
*
|
|
|
- * @param null|array Either an array of properties to treat as virtual or null to get properties
|
|
|
+ * @param null|array $properties Either an array of properties to treat as virtual or null to get properties
|
|
|
* @return array|\Cake\DataSource\EntityInterface
|
|
|
*/
|
|
|
public function virtualProperties($properties = null) {
|
|
|
@@ -389,7 +389,7 @@ trait EntityTrait {
|
|
|
/**
|
|
|
* Implements isset($entity);
|
|
|
*
|
|
|
- * @param mixed $offset
|
|
|
+ * @param mixed $offset The offset to check.
|
|
|
* @return bool Success
|
|
|
*/
|
|
|
public function offsetExists($offset) {
|
|
|
@@ -399,7 +399,7 @@ trait EntityTrait {
|
|
|
/**
|
|
|
* Implements $entity[$offset];
|
|
|
*
|
|
|
- * @param mixed $offset
|
|
|
+ * @param mixed $offset The offset to get.
|
|
|
* @return mixed
|
|
|
*/
|
|
|
public function &offsetGet($offset) {
|
|
|
@@ -409,8 +409,8 @@ trait EntityTrait {
|
|
|
/**
|
|
|
* Implements $entity[$offset] = $value;
|
|
|
*
|
|
|
- * @param mixed $offset
|
|
|
- * @param mixed $value
|
|
|
+ * @param mixed $offset The offset to set.
|
|
|
+ * @param mixed $value The value to set.
|
|
|
* @return void
|
|
|
*/
|
|
|
public function offsetSet($offset, $value) {
|
|
|
@@ -420,7 +420,7 @@ trait EntityTrait {
|
|
|
/**
|
|
|
* Implements unset($result[$offset);
|
|
|
*
|
|
|
- * @param mixed $offset
|
|
|
+ * @param mixed $offset The offset to remove.
|
|
|
* @return void
|
|
|
*/
|
|
|
public function offsetUnset($offset) {
|
|
|
@@ -467,7 +467,7 @@ trait EntityTrait {
|
|
|
* dirty property in the entity
|
|
|
*
|
|
|
* @param string $property the field to set or check status for
|
|
|
- * @param null|bool true means the property was changed, false means
|
|
|
+ * @param null|bool $isDirty true means the property was changed, false means
|
|
|
* it was not changed and null will make the function return current state
|
|
|
* for that property
|
|
|
* @return bool whether the property was changed or not
|
|
|
@@ -531,7 +531,7 @@ trait EntityTrait {
|
|
|
* This function returns true if there were no validation errors or false
|
|
|
* otherwise.
|
|
|
*
|
|
|
- * @param \Cake\Validation\Validator $validator
|
|
|
+ * @param \Cake\Validation\Validator $validator The validator to use when validating the entity.
|
|
|
* @return bool
|
|
|
*/
|
|
|
public function validate(Validator $validator) {
|
|
|
@@ -567,7 +567,7 @@ trait EntityTrait {
|
|
|
* When used as a setter, this method will return this entity instance for method
|
|
|
* chaining.
|
|
|
*
|
|
|
- * @param string|array $field
|
|
|
+ * @param string|array $field The field to get errors for, or the array of errors to set.
|
|
|
* @param string|array $errors The errors to be set for $field
|
|
|
* @return array|\Cake\Datasource\EntityInterface
|
|
|
*/
|
|
|
@@ -653,7 +653,7 @@ trait EntityTrait {
|
|
|
* $entity->accessible('id'); // Returns whether it can be set or not
|
|
|
* }}}
|
|
|
*
|
|
|
- * @param string|array single or list of properties to change its accessibility
|
|
|
+ * @param string|array $property single or list of properties to change its accessibility
|
|
|
* @param bool $set true marks the property as accessible, false will
|
|
|
* mark it as protected.
|
|
|
* @return \Cake\Datasource\EntityInterface|bool
|