Guest User

Untitled

a guest
Oct 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2. class SomeModel extends AppModel {
  3.  
  4. public $actsAs = array('Berry.Normalize');
  5.  
  6. public $normalize = array(
  7. '__skip__' => array('id', 'created', 'modified'), // skip normalize fields
  8. '__all__' => array( // __all__ params will be apply for all fields.
  9. 'trim' => true, // applicate function set to key
  10. ),
  11. '__default__' => array( // __default__ will be default params. this params will be apply, if each field params is not set.
  12. 'kana' => 'KVas', // function patameter set to value
  13. 'func' => array('a', 'b'), // if function has some patameter set to array
  14. ),
  15. 'somefield' => array( // each field params.
  16. 'func' => 'some',
  17. ),
  18. );
  19.  
  20. }
Add Comment
Please, Sign In to add comment