1 | <?php |
||
18 | class FirebaseModel |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | public static $nodeName = ''; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | public static $maps = []; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | public $key; |
||
35 | |||
36 | /** |
||
37 | * @var JCFirebase |
||
38 | */ |
||
39 | public $firebase; |
||
40 | |||
41 | /** |
||
42 | * FirebaseModel constructor. |
||
43 | * |
||
44 | * @param \JCFirebase\JCFirebase $firebase |
||
45 | */ |
||
46 | 6 | public function __construct(JCFirebase $firebase = null) |
|
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 6 | public static function getNodeName() |
|
58 | |||
59 | /** |
||
60 | * @param $nodeName |
||
61 | */ |
||
62 | 2 | public static function setNodeName($nodeName) |
|
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | 6 | public static function getMaps() |
|
71 | { |
||
72 | 6 | return static::$maps; |
|
73 | } |
||
74 | |||
75 | /** |
||
76 | * @param array $maps |
||
77 | */ |
||
78 | 1 | public static function setMaps($maps) |
|
82 | |||
83 | /** |
||
84 | * @return array |
||
85 | */ |
||
86 | 6 | public function getData() |
|
94 | |||
95 | /** |
||
96 | * @return bool |
||
97 | */ |
||
98 | 4 | public function create() |
|
108 | |||
109 | |||
110 | /** |
||
111 | * @return bool |
||
112 | */ |
||
113 | 4 | public function save() |
|
127 | |||
128 | /** |
||
129 | * @return bool |
||
130 | */ |
||
131 | 1 | public function delete() |
|
142 | |||
143 | /** |
||
144 | * @param $key |
||
145 | * @param JCFirebase $firebase |
||
146 | * |
||
147 | * @return object |
||
148 | */ |
||
149 | 6 | public static function findByKey($key, JCFirebase $firebase) |
|
161 | |||
162 | /** |
||
163 | * @param JCFirebase $firebase |
||
164 | * |
||
165 | * @return array(FirebaseModel) |
||
|
|||
166 | */ |
||
167 | 2 | public static function findAll(JCFirebase $firebase) |
|
184 | |||
185 | /** |
||
186 | * @param $object |
||
187 | * @param $instance |
||
188 | * @return object |
||
189 | */ |
||
190 | 5 | protected static function map($object, $instance) |
|
195 | |||
196 | /** |
||
197 | * @param array $objectVars |
||
198 | * @param bool $fromLocal |
||
199 | * @return array |
||
200 | */ |
||
201 | 6 | protected static function mapAttributes(array $objectVars, $fromLocal = true) |
|
215 | } |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.