| 1 | <?php |
||
| 17 | abstract class AbstractAdapter implements AdapterInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Identity |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $identifier; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * attribute sync cache |
||
| 29 | * |
||
| 30 | * @var int |
||
| 31 | */ |
||
| 32 | protected $attr_sync_cache = 0; |
||
| 33 | |||
| 34 | |||
| 35 | /** |
||
| 36 | * attribute map |
||
| 37 | * |
||
| 38 | * @var Iterable |
||
| 39 | */ |
||
| 40 | protected $map = []; |
||
| 41 | |||
| 42 | |||
| 43 | /** |
||
| 44 | * Ldap connect |
||
| 45 | * |
||
| 46 | * @param Iterable $config |
||
| 47 | * @param Logger $logger |
||
| 48 | * @return void |
||
|
|
|||
| 49 | */ |
||
| 50 | public function __construct(?Iterable $config, Logger $logger) |
||
| 55 | |||
| 56 | |||
| 57 | /** |
||
| 58 | * Get attribute sync cache |
||
| 59 | * |
||
| 60 | * @return int |
||
| 61 | */ |
||
| 62 | public function getAttributeSyncCache(): int |
||
| 66 | |||
| 67 | |||
| 68 | /** |
||
| 69 | * Set options |
||
| 70 | * |
||
| 71 | * @param Iterable $config |
||
| 72 | * @return AdapterInterface |
||
| 73 | */ |
||
| 74 | public function setOptions(?Iterable $config=null): AdapterInterface |
||
| 94 | |||
| 95 | |||
| 96 | /** |
||
| 97 | * Get identifier |
||
| 98 | * |
||
| 99 | * @return string |
||
| 100 | */ |
||
| 101 | public function getIdentifier(): string |
||
| 105 | |||
| 106 | |||
| 107 | /** |
||
| 108 | * Get attribute map |
||
| 109 | * |
||
| 110 | * @return Iterable |
||
| 111 | */ |
||
| 112 | public function getAttributeMap(): Iterable |
||
| 116 | } |
||
| 117 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.