/** * Temporary BC method for LdapObject construction. * * @todo remove this at some point. This is to check for instances where the class/category was in the constructor. * @param LdapObject $ldapObject * @return array */ protected function getParentArgs(LdapObject $ldapObject) { $constructor = (new \ReflectionClass(get_parent_class()))->getConstructor(); if ($constructor->getNumberOfParameters() == 2) { $args = [$ldapObject->toArray(), $ldapObject->getType()]; } else { $args = [$ldapObject->toArray(), [], '', $ldapObject->getType()]; } return $args; }