Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BaseClass {
- public static $definition = array(
- 'id' => array(type => 'int', 'required' => true),
- 'field1' => array(type => 'string', 'required' => true),
- 'field2' => array(type => 'bool', 'required' => true),
- // и еще 100500 элементов
- );
- }
- class ChildClass extends BaseClass {
- public static $definition = array(
- 'id' => array(type => 'int', 'required' => true),
- 'field1' => array(type => 'string', 'required' => false), // единственное изменение
- 'field2' => array(type => 'bool', 'required' => true),
- // и еще 100500 элементов без изменений
- );
- }
- class ChildClass extends BaseClass {
- // да да, так нельзя, я знаю :)
- public static $definition['field1']['required'] = true;
- }
Add Comment
Please, Sign In to add comment