Save privilege.

@param array $values
@return int
@throws UniqueConstraintViolationException
@throws \Dibi\Exception
423563
public function savePrivilege(array $values): int
    {
        $result = $this->generalSave($values, $this->tablePrivilege);
        $this->cache->clean([Cache::TAGS => ['DibiDriver']]);
        return $result;
    }
422313
public function intoValues(array $values)
    {
        if (is_array($values[0])) {
            $this->intoValues = $values;
        } else {
            $this->intoValues[] = $values;
        }
        return $this;
    }
148342
public function setValues($values) {

		if(false === is_array($values)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($values)), E_USER_ERROR);
		}

		$this -> values = $values;

		return $this;
	}
981832
protected function add(array $values)
    {
        $values =
                $this->dispatchBeforeOperationEvent(
                        '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\BeforeLanguageAddingEvent',
                        LanguageEvents::BEFORE_ADD_LANGUAGE,
                        $values,
                        array(
                            'message' => 'exception_language_adding_aborted',
                            'domain' => 'exceptions',
                        )
                );

        try {
            $this->validator->checkEmptyParams($values);
            $this->validator->checkRequiredParamsExists(array('LanguageName' => ''), $values);
            if ($this->validator->languageExists($values['LanguageName'])) {
                throw new LanguageException\LanguageExistsException('exception_language_already_exists');
            }

            if (empty($values['LanguageName'])) {
                throw new General\ArgumentIsEmptyException('exception_null_language_name');
            }

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

            $hasLanguages = $this->validator->hasLanguages();
            $values['MainLanguage'] = ($hasLanguages) ? (isset($values['MainLanguage'])) ? $values['MainLanguage'] : 0 : 1;
            if ($values['MainLanguage'] == 1 && $hasLanguages) {
                $result = $this->resetMain();
            }

            if ($result) {
                // Saves the language
                if (null === $this->alLanguage) {
                    $className = $this->languageRepository->getRepositoryObjectClassName();
                    $this->alLanguage = new $className();
                }

                $values = $this->checkCreatedAt($values);
                $result = $this->languageRepository
                            ->setRepositoryObject($this->alLanguage)
                            ->save($values);
                if (false !== $result) {
                    $eventName = LanguageEvents::BEFORE_ADD_LANGUAGE_COMMIT;
                    $result = !$this->eventsHandler
                                    ->createEvent($eventName, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\BeforeAddLanguageCommitEvent', array($this, $values))
                                    ->dispatch()
                                    ->getEvent($eventName)
                                    ->isAborted();
                }
            }

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

                $this->eventsHandler
                     ->createEvent(LanguageEvents::AFTER_ADD_LANGUAGE, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\AfterLanguageAddedEvent', 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;
        }
    }
323102
public function setValuesSafe(array $values = [])
    {
        $blacklist = is_array(static::$blacklist) ? static::$blacklist : [static::$primary_key];

        foreach ($values as $key => $value) {
            if (!in_array($key, $blacklist) && isset(self::$column_cache[get_called_class()][$key])) {
                $this->set($key, $values[$key]);
            }
        }
    }
50391
public function insertAndGetLastId(array $values)
    {
        $this->insert($values);

        $n = $this->connection->lastInsertId();

        return $n;
    }
1318741
public function setWritableValues(array $values)
    {
        foreach ($values as $key => $value) {
            if ($this->isWritable($key)) {
                $this->$key = $value;
            }
        }

        return $this;
    }
1110226
public static function isOptionalExistingValue($value, array $values)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredExistingValue($value, $values);
    }
253430
public function attachKeyValuePair(array $values)
    {

        foreach ($values as $key => $value) {
            $this->addKeyValuePair($key, $value);
        }
        return true;
    }
865091
public function setValues(array $values = [])
    {
        $this->values = array_map(function($value) {
            // We need to make sure all values given to a batch modification are
            // strings, otherwise we'll receive an LDAP exception when
            // we try to process the modification.
            return (string) $value;
        }, $values);

        return $this;
    }
671300
private function pemKeyLenCheck($values)
    {
        if (!is_array($values) || strlen($values[0]) < 62 || strlen($values[1]) < 126) {
            throw new \Exception('Invalid or corrupt secp256k1 key provided. Cannot decode the supplied PEM data. Key lengths too short.  Values checked were "' . var_export($values[0], true) . '" and "' . var_export($values[1], true) . '".');
        }
    }
414132
public function execute($values=null)
    {
        $ok = false;
        set_error_handler(array($this->_pdooci,"errorHandler"));
        try {
            $auto = $this->_pdooci->getAutoCommit() ? \OCI_COMMIT_ON_SUCCESS : \OCI_NO_AUTO_COMMIT;

            if ($values && sizeof($values)>0) {
                foreach ($values as $key => $val) {
                    $parm = $key;
                    if (preg_match('/^\d+$/', $key)) {
                        $parm ++;
                    }
                    $this->bindParam($parm, $values[$key]);
                    $this->_pdooci->setError();
                }
            }
            $ok = \oci_execute($this->_stmt, $auto);
            if (!$ok) {
                $this->_pdooci->setError($this->_stmt);
                $error = $this->_pdooci->errorInfo();
                throw new \PDOException($error[2]);
            } else {
                if (count($this->_bindsLob)) {
                    foreach ($this->_bindsLob as $param => $bind) {
                        $ok = $bind['lob']->save($bind['value']);
                        if (!$ok) {
                            $error = $this->_pdooci->errorInfo();
                            $e = new \PDOException($error[2], $error[1]);
                            $e->errorInfo = $error;
                            throw $e;
                        }
                    }
                }
            }
        } catch (\PDOException $e) {
            throw $e;
        } catch (\Exception $e) {
            throw new \PDOException($e->getMessage());
        }
        restore_error_handler();
        return $ok;
    }
298657
public function setValues(array $values)
    {
        $this->getValidator()->validateRequired($values, $this->required);
        $this->values = array_merge($this->values, $values);
        
        return $this;
    }
840178
public function update(array $values)
    {
        $count = 0;

        foreach ($this->getModels() as $model) {
            $model->fill($values);
            $count += $model->save() ? 1 : 0;
        }

        return 0;
    }
1070273
public function forceUpdate(array $values)
    {
        $dao = $this->getEntityDao();

        $dao->setValues($values);

        $dao->update();

        return $this;
    }
566438
public function priorityIn(array $values)
    {
        foreach ($values as $index => $value) {
            $values[$index] = (int) $value;
        }
        $this->add(new Criterium(self::CRITERIUM_PRIORITY_IN, $values));

        return $this;
    }
1332599
public function evaluate($values)
    {
        $returnValue = PasswordConstraintsService::singleton()->validate($values);

        if( !$returnValue && !$this->hasOption('message') ){
            $this->setMessage(implode( ', ', PasswordConstraintsService::singleton()->getErrors()));
        }

        return (bool) $returnValue;
    }