1 | <?php |
||
37 | abstract class Model implements ModelInterface |
||
38 | { |
||
39 | /** |
||
40 | * @var Context A Context instance. |
||
41 | */ |
||
42 | protected $context = null; |
||
43 | |||
44 | /** |
||
45 | * @var string The context name |
||
46 | */ |
||
47 | protected $_contextName = null; |
||
48 | /** |
||
49 | * Retrieve the current application context. |
||
50 | * |
||
51 | * @return Context The current Context instance. |
||
52 | * |
||
53 | * @author Sean Kerr <[email protected]> |
||
54 | * @since 0.9.0 |
||
55 | */ |
||
56 | final public function getContext() |
||
60 | |||
61 | /** |
||
62 | * Initialize this model. |
||
63 | * |
||
64 | * @param Context $context The current application context. |
||
65 | * |
||
66 | * @author Sean Kerr <[email protected]> |
||
67 | * @since 0.9.0 |
||
68 | */ |
||
69 | public function initialize(Context $context, array $parameters = array()) |
||
73 | |||
74 | /** |
||
75 | * Pre-serialization callback. |
||
76 | * |
||
77 | * Will set the name of the context and exclude the instance from serializing. |
||
78 | * |
||
79 | * @author David Zülke <[email protected]> |
||
80 | * @since 0.11.0 |
||
81 | */ |
||
82 | public function __sleep() |
||
89 | |||
90 | /** |
||
91 | * Post-unserialization callback. |
||
92 | * |
||
93 | * Will restore the context based on the names set by __sleep. |
||
94 | * |
||
95 | * @author David Zülke <[email protected]> |
||
96 | * @since 0.11.0 |
||
97 | */ |
||
98 | public function __wakeup() |
||
103 | } |
||
104 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.