| 1 | <?php namespace jlourenco\base\Repositories; |
||
| 5 | class SettingsRepository implements SettingsRepositoryInterface |
||
| 6 | {
|
||
| 7 | use RepositoryTrait; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * The Settings model name. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $model = 'jlourenco\base\Models\Settings'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Create a new settings repository. |
||
| 18 | * |
||
| 19 | * @param string $model |
||
| 20 | */ |
||
| 21 | public function __construct($model = null) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * {@inheritDoc}
|
||
| 29 | */ |
||
| 30 | public function findById($id) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritDoc}
|
||
| 40 | */ |
||
| 41 | public function findByName($name) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * {@inheritDoc}
|
||
| 52 | */ |
||
| 53 | public function findByFriendlyName($name) |
||
| 61 | |||
| 62 | public function getSetting($name) |
||
| 66 | |||
| 67 | } |
||
| 68 |
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@propertyannotation 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.