1 | <?php |
||
21 | class Client extends Base |
||
22 | { |
||
23 | /** |
||
24 | * Mail transport instances. |
||
25 | * |
||
26 | * @var \Pimple\Container |
||
27 | */ |
||
28 | private $transports; |
||
29 | |||
30 | /** |
||
31 | * Constructor. |
||
32 | * |
||
33 | * @param \Pimple\Container $container |
||
34 | */ |
||
35 | public function __construct(Container $container) |
||
40 | |||
41 | /** |
||
42 | * Send a HTML email. |
||
43 | * |
||
44 | * @param string $email |
||
45 | * @param string $name |
||
46 | * @param string $subject |
||
47 | * @param string $html |
||
48 | * |
||
49 | * @return Client |
||
50 | */ |
||
51 | public function send($email, $name, $subject, $html) |
||
61 | |||
62 | /** |
||
63 | * Get email author. |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getAuthor() |
||
77 | |||
78 | /** |
||
79 | * Get mail transport instance. |
||
80 | * |
||
81 | * @param string $transport |
||
82 | * |
||
83 | * @return ClientInterface |
||
84 | */ |
||
85 | public function getTransport($transport) |
||
89 | |||
90 | /** |
||
91 | * Add a new mail transport. |
||
92 | * |
||
93 | * @param string $transport |
||
94 | * @param string $class |
||
95 | * |
||
96 | * @return Client |
||
97 | */ |
||
98 | public function setTransport($transport, $class) |
||
108 | |||
109 | /** |
||
110 | * Return the list of registered transports. |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | public function getAvailableTransports() |
||
120 | } |
||
121 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.