1 | <?php |
||
28 | class BannerService extends Object implements BannerServiceInterface |
||
|
|||
29 | { |
||
30 | /** |
||
31 | * @var string|array|Connection |
||
32 | */ |
||
33 | private $_db = 'db'; |
||
34 | /** |
||
35 | * @var FileManagerInterface |
||
36 | */ |
||
37 | private $_fileManager; |
||
38 | /** |
||
39 | * @var Banner |
||
40 | */ |
||
41 | private $_model; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | * @param FileManagerInterface $fileManager |
||
47 | */ |
||
48 | public function __construct(FileManagerInterface $fileManager, $config = []) |
||
53 | |||
54 | /** |
||
55 | * @param string|array|Connection $db |
||
56 | */ |
||
57 | public function setDb($db) |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | public function init() |
||
69 | |||
70 | /** |
||
71 | * @return \yii\data\ActiveDataProvider |
||
72 | */ |
||
73 | public function getDataProvider() |
||
80 | |||
81 | /** |
||
82 | * @param int $id |
||
83 | * @return Banner |
||
84 | * @throws NotFoundHttpException |
||
85 | */ |
||
86 | private function findModel($id) |
||
93 | |||
94 | /** |
||
95 | * Returns primary model object. |
||
96 | * |
||
97 | * @param null|int $id |
||
98 | * @return Banner |
||
99 | * @throws NotFoundHttpException |
||
100 | */ |
||
101 | public function getModel($id = null) |
||
113 | |||
114 | /** |
||
115 | * Save uploaded file to file system. |
||
116 | * |
||
117 | * @param BannerTranslation $model |
||
118 | * @return string |
||
119 | * @throws FileUploadException |
||
120 | */ |
||
121 | private function saveUploadedFile($model) |
||
138 | |||
139 | /** |
||
140 | * Save banner to database. |
||
141 | * |
||
142 | * @param array $data |
||
143 | * @throws FileUploadException |
||
144 | * @throws \DomainException |
||
145 | * @throws \RuntimeException |
||
146 | */ |
||
147 | protected function saveInternal(array $data) |
||
164 | |||
165 | /** |
||
166 | * Save banner and log exceptions. |
||
167 | * |
||
168 | * @param array $data |
||
169 | * @return bool |
||
170 | */ |
||
171 | public function save(array $data) |
||
182 | |||
183 | /** |
||
184 | * Removes banner. |
||
185 | * |
||
186 | * @param int $id |
||
187 | * @return bool |
||
188 | * @throws NotFoundHttpException |
||
189 | */ |
||
190 | public function delete($id) |
||
206 | } |
||
207 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.