/** * Uses the new Iterator in LdapEntityManager to return the next element of a search * * Returns false if there are no more objects in the iterator */ public function itGetNext($varname = false, $value = false) { if (empty($this->it)) { $this->it = $this->em->getIterator($this->getFilter($varname, $value), $this->entityName); } return $this->it->next(); }
/** * @param $filterArray * @param array $attributes * @return string LDAP filter string * @see \CarnegieLearning\LdapOrmBundle\Ldap\Filter\LdapFilter::createComplexLdapFilter($mixed) */ public function findByComplex($filterArray, $attributes = array()) { $options = []; $options['filter'] = new LdapFilter($filterArray); foreach ($attributes as $key => $value) { $options[$key] = $value; } return $this->em->retrieve($this->entityName, $options); }