1 | <?php |
||
18 | trait SchemaTrait |
||
19 | { |
||
20 | /** |
||
21 | * The LDAP API references an LDAP object by its distinguished name (DN). |
||
22 | * A DN is a sequence of relative distinguished names (RDN) connected by commas. |
||
23 | * |
||
24 | * @link https://msdn.microsoft.com/en-us/library/aa366101(v=vs.85).aspx |
||
25 | * @var string |
||
26 | */ |
||
27 | public $dn; |
||
28 | |||
29 | /** |
||
30 | * Returns the list of attribute names. |
||
31 | * By default, this method returns all public properties of the class. |
||
32 | * @return array list of attribute names. |
||
33 | */ |
||
34 | public function getAttributes() |
||
35 | { |
||
36 | $class = new ReflectionClass(self::class); |
||
37 | $names = []; |
||
38 | foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { |
||
39 | $names[] = $property->getName(); |
||
40 | } |
||
41 | |||
42 | return $names; |
||
43 | } |
||
44 | |||
45 | } |
||
46 |