Agrega un atributo tal como en changetype: modify\nremove: $atributo
@param string $dn
@param array $valores
@return boolean
@throws Exception
438237
protected function removerAtributosEntradaLdap($dn, $valores) {
        try{
            $this->verificaAutenticacion();
            if (ldap_mod_del($this->conexionLdap, $dn, $valores)) {
                return true;
            } else {
                throw new ErrorException(ldap_error($this->conexionLdap));
            }
        }catch(ErrorException $e){
            $this->configurarErrorLdap("Error modificando attributos", $e->getMessage());
            return false;
        }
    }
51750
public function modify($dn, $attribute)
	{
		if (!$this->isBound || !$this->isConnected())
		{
			return false;
		}

		return ldap_modify($this->resource, $dn, $attribute);
	}
12527
public function changed($attrs=false) 
    {
        $changes = array();
        $cls     = get_called_class();

        foreach (self::$_columns[$cls] as $column) {
            // if is the primary key or one of the automatic columns, skip
            if ($cls::getPK() == $column || in_array(strtolower($column), array("created_at","updated_at"))) {
                continue;
            }

            $cur = $this->get($column);         // current value
            $old = $this->get($column, false);  // old value

            // if same value, didn't change
            if ($cur == $old) {
                continue;
            }

            // set the value as the changed column name
            $value = $column;

            // if checking the attributes, return an array with both values
            if ($attrs) {
                $value = array($old, $cur);
                $changes[$column] = $value;
            } else {
                array_push($changes, $value);
            }
        }
        return $changes;
    }
118490
public function assignValuesFromText($sIn, $dVat = null)
    {
        $aRet = [];
        $aPieces = explode('@@', $sIn);
        foreach ($aPieces as $sVal) {
            if ($sVal) {
                $aName = explode('__', $sVal);
                if (isset($aName[0]) && isset($aName[1])) {
                    $aRet[] = $this->_fillExplodeArray($aName, $dVat);
                }
            }
        }

        return $aRet;
    }
144063
public static function setDSN($dsn)
        {
            $dsn_details = parse_url($dsn);
            if (!is_array($dsn_details) || !array_key_exists('scheme', $dsn_details)) {
                throw new Exception('This does not look like a valid DSN - cannot read the database type');
            }
            try {
                self::setDriver($dsn_details['scheme']);
                $details = explode(';', $dsn_details['path']);
                foreach ($details as $detail) {
                    $detail_info = explode('=', $detail);
                    if (count($detail_info) != 2) {
                        throw new Exception('This does not look like a valid DSN - cannot read the connection details');
                    }
                    switch ($detail_info[0]) {
                        case 'host':
                            self::setHostname($detail_info[1]);
                            break;
                        case 'port':
                            self::setPort($detail_info[1]);
                            break;
                        case 'dbname':
                            self::setDatabaseName($detail_info[1]);
                            break;
                    }
                }
            } catch (\Exception $e) {
                throw $e;
            }
            self::$dsn = $dsn;
        }
611516
protected function getLdifEntryObject($dn, $changeType)
    {
        if (!array_key_exists($changeType, $this->changeTypeMap)) {
            $this->throwException(sprintf('The changetype "%s" is invalid', $changeType));
        }

        return new $this->changeTypeMap[$changeType]($dn);
    }
707892
protected function modifyMultivaluedAttribute(array $values, array $newValues)
    {
        if ($this->getOperationType() == AttributeConverterInterface::TYPE_CREATE || ($this->getBatch() && $this->getBatch()->isTypeAdd())) {
            $values = array_merge($values, $newValues);
        } elseif ($this->getBatch() && $this->getBatch()->isTypeReplace()) {
            $values = $newValues;
        } elseif ($this->getBatch() && $this->getBatch()->isTypeRemove()) {
            $values = array_diff($values, $newValues);
        }

        return $values;
    }
433132
public function insertRow(array $values)
    {
        // @todo remove after testing
        if (
            !isset($values['text']) ||
            !isset($values['text_md5']) ||
            !isset($values['action']) ||
            !isset($values['parent']) ||
            !isset($values['lang_mask'])) {
            throw new \Exception('value set is incomplete: ' . var_export($values, true) . ", can't execute insert");
        }
        if (!isset($values['id'])) {
            $values['id'] = $this->getNextId();
        }
        if (!isset($values['link'])) {
            $values['link'] = $values['id'];
        }
        if (!isset($values['is_original'])) {
            $values['is_original'] = ($values['id'] == $values['link'] ? 1 : 0);
        }
        if (!isset($values['is_alias'])) {
            $values['is_alias'] = 0;
        }
        if (!isset($values['alias_redirects'])) {
            $values['alias_redirects'] = 0;
        }
        if (!isset($values['action_type'])) {
            if (preg_match('#^(.+):.*#', $values['action'], $matches)) {
                $values['action_type'] = $matches[1];
            }
        }
        if ($values['is_alias']) {
            $values['is_original'] = 1;
        }
        if ($values['action'] === 'nop:') {
            $values['is_original'] = 0;
        }

        /** @var $query \eZ\Publish\Core\Persistence\Database\InsertQuery */
        $query = $this->dbHandler->createInsertQuery();
        $query->insertInto($this->dbHandler->quoteTable($this->table));
        $this->setQueryValues($query, $values);
        $query->prepare()->execute();

        return $values['id'];
    }
567475
protected function edit(array $values)
    {
        $values =
            $this->dispatchBeforeOperationEvent(
                    '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\BeforeLanguageEditingEvent',
                    LanguageEvents::BEFORE_EDIT_LANGUAGE,
                    $values,
                    array(
                        'message' => 'exception_language_editing_aborted',
                        'domain' => 'exceptions',
                    )
            );

        try {
            $this->validator->checkEmptyParams($values);
            $this->validator->checkOnceValidParamExists(array('LanguageName' => '', 'MainLanguage' => ''), $values);

            $result = true;
            $this->languageRepository->startTransaction();

            $requireToChangeName = array_key_exists('LanguageName', $values);

            if (isset($values["MainLanguage"]) && $values["MainLanguage"] == 1) {
                $result = $this->resetMain();
            } else {
                unset($values["MainLanguage"]);
                if (! $requireToChangeName) {
                    throw new LanguageException\MainLanguageCannotBeDegradedException('exception_main_language_cannot_be_degraded');
                }
            }

            if (false !== $result) {
                if ($requireToChangeName && ! empty($values['LanguageName']) && $this->alLanguage->getLanguageName() == $values['LanguageName']) {
                    unset($values['LanguageName']);
                }

                if (empty($values)) {
                    $this->languageRepository->rollBack();

                    return false;
                }

                $result = $this->languageRepository
                    ->setRepositoryObject($this->alLanguage)
                    ->save($values)
                ;

                if (false != $result) {
                    $eventName = LanguageEvents::BEFORE_EDIT_LANGUAGE_COMMIT;
                    $result = !$this->eventsHandler
                        ->createEvent($eventName, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\BeforeEditLanguageCommitEvent', array($this, $values))
                        ->dispatch()
                        ->getEvent($eventName)
                        ->isAborted()
                    ;
                }
            }

            if (false !== $result) {
                $this->languageRepository->commit();

                $this->eventsHandler
                     ->createEvent(LanguageEvents::AFTER_EDIT_LANGUAGE, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\AfterLanguageEditedEvent', array($this))
                     ->dispatch();

                return $result;
            }

            $this->languageRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            if (isset($this->languageRepository) && $this->languageRepository !== null) {
                $this->languageRepository->rollBack();
            }

            throw $e;
        }
    }
77171
public function setReplaceValues(array $values, $notReplacedGetEmpty = true)
    {
        $this->replaceValues = $values;
        $this->notReplacedGetEmpty = (bool) $notReplacedGetEmpty;

        $this->setFilterDefaultOperation(Filter::EQUAL);
        $this->setFilterSelectOptions($values);
    }
698921
public static function isDnsError(string $domain): bool
    {
        if (\function_exists('checkdnsrr')) {
            /** @noinspection IfReturnReturnSimplificationInspection */
            $mxFound = \checkdnsrr($domain . '.', 'MX');
            if ($mxFound === true) {
                return false;
            }

            $aFound = \checkdnsrr($domain . '.', 'A');
            /** @noinspection IfReturnReturnSimplificationInspection */
            if ($aFound === true) {
                return false;
            }

            return true;
        }

        throw new \Exception(' Can\'t call checkdnsrr');
    }
948572
private function set_domain_results($users, $domain, $val)
        {
            if (!Arrays::is($users)) {
                $users = (array) $users;
            }
            foreach ($users as $user) {
                $this->results[$user . '@' . $domain] = $val;
            }
        }
1097583
private function mapa(array $atributos, $entrada){
        $objeto = array('dn'=>ldap_get_dn($this->conexionLdap, $entrada));
        foreach ($atributos as $attr) {
            if (($valor = @ldap_get_values($this->conexionLdap, $entrada, $attr))){
                // Elimino el índice count
                array_pop($valor);
                // $valor es un array.
                // En caso de ser valor único, tomamos el indíce cero, caso contrario 
                // metemos todo el array
                $objeto[$attr] = count($valor)==1 ? $valor[0]:  $valor;
            } // TODO: ¿Un else para configurar un valor por defecto
        }
        return $objeto;
    }
169436
public static function explodeDn($dn, $withAttributes = 1)
    {
        $pieces = ldap_explode_dn($dn, $withAttributes);

        if ($pieces === false || !isset($pieces['count']) || $pieces['count'] == 0) {
            throw new InvalidArgumentException(sprintf('Unable to parse DN "%s".', $dn));
        }
        for ($i = 0; $i < $pieces['count']; $i++) {
            $pieces[$i] = self::unescapeValue($pieces[$i]);
        }
        unset($pieces['count']);

        return $pieces;
    }
116435
public function setValues(array $values)
    {
        $listValues = [];

        if (empty($values)) {
            throw new DomainException('Values cannot be empty');
        }

        foreach ($values as $value) {
            if (is_scalar($value)) {
                $listValues[] = $value;
            } else {
                throw new DomainException('Each value must be a scalar element');
            }
        }

        return $this->setAttribute('values', $listValues);
    }
113616
public function modify($dn, array $entry)
    {
        if ($this->suppressErrors) {
            return @ldap_modify($this->getConnection(), $dn, $entry);
        }

        return ldap_modify($this->getConnection(), $dn, $entry);
    }
893672
public function _update(...$keyValues) {
		$instance = DAO::getOne ( $this->model, $keyValues, false );
		$this->operate_ ( $instance, function ($instance) {
			$datas = $this->getDatas ();
			$this->_setValuesToObject ( $instance, $datas );
			if ($this->_validateInstance ( $instance, array_keys ( $datas ) )) {
				return $this->updateOperation ( $instance, $datas, true );
			}
			return null;
		}, "updated", "Unable to update the instance", $keyValues );
	}