"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/guide/rest-resources.md" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

rest-resources.md  (yii2-2.0.35):rest-resources.md  (yii2-2.0.36)
skipping to change at line 83 skipping to change at line 83
// field name is "email", the corresponding attribute name is "email_add ress" // field name is "email", the corresponding attribute name is "email_add ress"
'email' => 'email_address', 'email' => 'email_address',
// field name is "name", its value is defined by a PHP callback // field name is "name", its value is defined by a PHP callback
'name' => function ($model) { 'name' => function ($model) {
return $model->first_name . ' ' . $model->last_name; return $model->first_name . ' ' . $model->last_name;
}, },
]; ];
} }
// filter out some fields, best used when you want to inherit the parent impleme ntation // filter out some fields, best used when you want to inherit the parent impleme ntation
// and blacklist some sensitive fields. // and exclude some sensitive fields.
public function fields() public function fields()
{ {
$fields = parent::fields(); $fields = parent::fields();
// remove fields that contain sensitive information // remove fields that contain sensitive information
unset($fields['auth_key'], $fields['password_hash'], $fields['password_reset _token']); unset($fields['auth_key'], $fields['password_hash'], $fields['password_reset _token']);
return $fields; return $fields;
} }
``` ```
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)