1 | <?php |
||
17 | abstract class AbstractManager implements ManagerInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var Client |
||
21 | */ |
||
22 | protected $client; |
||
23 | |||
24 | public function __construct(Client $client) |
||
25 | { |
||
26 | $this->client = $client; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Gets the model class. |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | abstract public function getModelClass(); |
||
35 | |||
36 | /** |
||
37 | * Gets the resource name. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | abstract public function getResourceName(); |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function getClient() |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function fromArray(array $data, $modelClass = null) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function createMany(array $data, $modelClass = null) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function toArray($model) |
||
83 | } |