ldap_add example

private Connection $connection,
    ) {
    }

    /** * @return $this */
    public function add(Entry $entry)
    {
        $con = $this->getConnectionResource();

        if (!@ldap_add($con$entry->getDn()$entry->getAttributes())) {
            throw new LdapException(sprintf('Could not add entry "%s": ', $entry->getDn()).ldap_error($con)ldap_errno($con));
        }

        return $this;
    }

    /** * @return $this */
    public function update(Entry $entry)
    {
        
Home | Imprint | This part of the site doesn't use cookies.