1 | <?php |
||
7 | abstract class AbstractBaseItem |
||
8 | { |
||
9 | /** |
||
10 | * Raw data retrieved from API |
||
11 | * @var array |
||
12 | */ |
||
13 | public $raw = []; |
||
14 | |||
15 | /** |
||
16 | * Convert raw response data to item |
||
17 | * |
||
18 | * @param array|mixed $raw |
||
19 | * @return static |
||
20 | * @throws \Exception |
||
21 | */ |
||
22 | static function fromArray($raw) |
||
29 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.