src/LdapTools/Ldif/LdifParser.php
protected function parseEntry()
    {
        $entry = $this->parseCommonDirectives($this->getKeyAndValue($this->currentLine())[1]);

        if (!empty($this->commentQueue)) {
            $entry->addComment(...$this->commentQueue);
            $this->commentQueue = [];
        }

        // Nothing further to do with a simple deletion...
        if ($entry instanceof LdifEntryDelete) {
            return $entry;
        }

        while (!$this->isEndOfLdif() && !$this->isStartOfEntry()) {
            if ($this->isComment()) {
                $entry->addComment(substr($this->currentLine(), 1));
                $this->nextLine();
            } elseif ($this->isEndOfEntry()) {
                break;
            } else {
                list($key, $value) = $this->getKeyAndValue($this->currentLine());
                $this->addDirectiveToEntry($key, $value, $entry);
                $this->nextLine();
            }
        }

        return $entry;
    }
protected function parseEntry()
    {
        $entry = $this->parseCommonDirectives($this->getKeyAndValue($this->currentLine())[1]);

        if (!empty($this->commentQueue)) {
            $entry->addComment(...$this->commentQueue);
            $this->commentQueue = [];
        }

        // Nothing further to do with a simple deletion...
        if ($entry instanceof LdifEntryDelete) {
            return $entry;
        }

        while (!$this->isEndOfLdif() && !$this->isStartOfEntry()) {
            if ($this->isComment()) {
                $entry->addComment(substr($this->currentLine(), 1));
                $this->nextLine();
            } elseif ($this->isEndOfEntry()) {
                break;
            } else {
                list($key, $value) = $this->getKeyAndValue($this->currentLine());
                $this->addDirectiveToEntry($key, $value, $entry);
                $this->nextLine();
            }
        }

        return $entry;
    }
protected function parseEntry ( ) { $ entry = $ this -> parseCommonDirectives ( $ this -> getKeyAndValue ( $ this -> currentLine ( ) ) [ 1 ] ) ; if ( ! empty ( $ this -> commentQueue ) ) { $ entry -> addComment ( ... $ this -> commentQueue ) ; $ this -> commentQueue = [ ] ; } // Nothing further to do with a simple deletion... if ( $ entry instanceof LdifEntryDelete ) { return $ entry ; } while ( ! $ this -> isEndOfLdif ( ) && ! $ this -> isStartOfEntry ( ) ) { if ( $ this -> isComment ( ) ) { $ entry -> addComment ( substr ( $ this -> currentLine ( ) , 1 ) ) ; $ this -> nextLine ( ) ; } elseif ( $ this -> isEndOfEntry ( ) ) { break ; } else { list ( $ key , $ value ) = $ this -> getKeyAndValue ( $ this -> currentLine ( ) ) ; $ this -> addDirectiveToEntry ( $ key , $ value , $ entry ) ; $ this -> nextLine ( ) ; } } return $ entry ; }
Parse an entry from the DN position until we reach the start of the next entry. Return the entry that was parsed.

@return LdifEntryInterface
Parse an entry from the DN position until we reach the start of the next entry . Return the entry that was parsed .