LdapTools\Ldif\Ldif::toString PHP Method

toString() public method

Get the string representation of the LDIF object with all of the entries it has.
public toString ( ) : string
return string
    public function toString()
    {
        $ldif = $this->addCommentsToString('');
        if (!is_null($this->version)) {
            $ldif .= $this->getLdifLine(self::DIRECTIVE_VERSION, $this->version);
        }
        foreach ($this->entries as $entry) {
            $this->setupEntry($entry);
            $ldif .= $this->lineEnding . $entry->toString();
        }
        return $ldif;
    }