Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class SomeModel extends AppModel {
- public $actsAs = array('Berry.Normalize');
- public $normalize = array(
- '__skip__' => array('id', 'created', 'modified'), // skip normalize fields
- '__all__' => array( // __all__ params will be apply for all fields.
- 'trim' => true, // applicate function set to key
- ),
- '__default__' => array( // __default__ will be default params. this params will be apply, if each field params is not set.
- 'kana' => 'KVas', // function patameter set to value
- 'func' => array('a', 'b'), // if function has some patameter set to array
- ),
- 'somefield' => array( // each field params.
- 'func' => 'some',
- ),
- );
- }
Add Comment
Please, Sign In to add comment