protected function setLdapObjectForProperty(\ReflectionProperty $property, LdapObjectAnnotation $annotation, $entity)
    {
        if (empty($property->getValue($entity))) {
            return;
        }
        $domain = $this->ldap->getDomainContext();
        $switchDomain = $annotation->domain ?: null;
        if ($switchDomain) {
            $this->ldap->switchDomain($annotation->domain);
        }

        $results = $this->queryLdapForObjects($property, $annotation, $entity);
        $property->setValue($entity, $results);

        if ($switchDomain) {
            $this->ldap->switchDomain($domain);
        }
    }
protected function setLdapObjectForProperty(\ReflectionProperty $property, LdapObjectAnnotation $annotation, $entity)
    {
        if (empty($property->getValue($entity))) {
            return;
        }
        $domain = $this->ldap->getDomainContext();
        $switchDomain = $annotation->domain ?: null;
        if ($switchDomain) {
            $this->ldap->switchDomain($annotation->domain);
        }

        $results = $this->queryLdapForObjects($property, $annotation, $entity);
        $property->setValue($entity, $results);

        if ($switchDomain) {
            $this->ldap->switchDomain($domain);
        }
    }
protected function setLdapObjectForProperty ( \ ReflectionProperty $ property , LdapObjectAnnotation $ annotation , $ entity ) { if ( empty ( $ property -> getValue ( $ entity ) ) ) { return ; } $ domain = $ this -> ldap -> getDomainContext ( ) ; $ switchDomain = $ annotation -> domain ? : null ; if ( $ switchDomain ) { $ this -> ldap -> switchDomain ( $ annotation -> domain ) ; } $ results = $ this -> queryLdapForObjects ( $ property , $ annotation , $ entity ) ; $ property -> setValue ( $ entity , $ results ) ; if ( $ switchDomain ) { $ this -> ldap -> switchDomain ( $ domain ) ; } }
Based on an array of IDs for LDAP objects, set the property to either a LdapObject for LdapObjectCollection.

@param \ReflectionProperty $property
@param LdapObjectAnnotation $annotation
@param $entity
Based on an array of IDs for LDAP objects set the property to either a LdapObject for LdapObjectCollection .