1 | <?php |
||
13 | class SearchSource extends ParameterArrayConstructor implements JsonSerializable |
||
14 | { |
||
15 | /** |
||
16 | * Human-readable name |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $name; |
||
20 | |||
21 | /** |
||
22 | * URL to source home page |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $url; |
||
26 | |||
27 | protected $icon; |
||
28 | |||
29 | /** |
||
30 | * Construct a SearchSource from a search domain |
||
31 | * |
||
32 | * @param AbstractSearchDomain $domain |
||
33 | */ |
||
34 | public function __construct(AbstractSearchDomain $domain) |
||
42 | |||
43 | public function jsonSerialize() |
||
51 | } |
||
52 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: