1 | <?php |
||
8 | abstract class AbstractComponent |
||
9 | extends AbstractController |
||
|
|||
10 | { |
||
11 | /** |
||
12 | * Constructor |
||
13 | * |
||
14 | * @param array $model |
||
15 | */ |
||
16 | public function __construct( array $model = array() ) |
||
21 | |||
22 | /** |
||
23 | * The default model to use when none is provided to the constructor. |
||
24 | * This method should be overriden by child class to define the default |
||
25 | * model. |
||
26 | * |
||
27 | * @return array |
||
28 | */ |
||
29 | public function default_model() |
||
33 | |||
34 | /** |
||
35 | * The list of required model arguments. |
||
36 | * This method should be overriden by child class to specify required model |
||
37 | * arguments. |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | public function required_arguments() |
||
45 | |||
46 | /** |
||
47 | * Set the model data for this component. |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | public function set_model( $model ) |
||
70 | |||
71 | /** |
||
72 | * A hook that is called once the component has been created. |
||
73 | */ |
||
74 | protected function on_created() {} |
||
75 | } |