1 | <?php |
||
13 | abstract class ImageUploader |
||
14 | { |
||
15 | /** |
||
16 | * @var ImageValidatorInterface |
||
17 | */ |
||
18 | protected $validator; |
||
19 | |||
20 | /** |
||
21 | * @var StorageInterface |
||
22 | */ |
||
23 | protected $storage; |
||
24 | |||
25 | /** |
||
26 | * @var ImageRepositoryInterface |
||
27 | */ |
||
28 | protected $image_repo; |
||
29 | |||
30 | /** |
||
31 | * ImageUploader constructor. |
||
32 | * |
||
33 | * @param ImageValidatorInterface $validator |
||
34 | * @param StorageInterface $storage |
||
35 | * @param ImageRepositoryInterface $image_repo |
||
36 | */ |
||
37 | public function __construct( |
||
47 | |||
48 | /** |
||
49 | * Handle Image Upload |
||
50 | * |
||
51 | * @param mixed $framework_file |
||
52 | * @param ImageConfiguration $config |
||
53 | * @param array $optional_data |
||
54 | * @return ServiceResponse |
||
55 | */ |
||
56 | public function handle($framework_file, ImageConfiguration $config, array $optional_data = []) |
||
95 | |||
96 | |||
97 | /** |
||
98 | * Prepare Image File |
||
99 | * |
||
100 | * Take raw upload and convert it to an image file |
||
101 | * |
||
102 | * @param $framework_file |
||
103 | * @return ImageFile |
||
104 | */ |
||
105 | abstract protected function prepareImageFile($framework_file): ImageFile; |
||
106 | } |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.