| 1 | <?php |
||
| 17 | abstract class Authenticator |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Creates an new Authenticator to $repository. |
||
| 21 | * |
||
| 22 | * @param \eZ\Publish\API\Repository\Repository $repository |
||
| 23 | */ |
||
| 24 | public function __construct(Repository $repository) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Authenticates the user based on the given request. |
||
| 31 | * |
||
| 32 | * Performs an authentication based on the given $request and sets the |
||
| 33 | * authenticated user into the $repository. Returns true on success, false |
||
| 34 | * of authentication was not possible or did not succeed. |
||
| 35 | * |
||
| 36 | * @param RMF\Request $request |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | abstract public function authenticate(RMF\Request $request); |
||
| 41 | } |
||
| 42 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: