protected function setQueryValues(Query $query, $values)
    {
        foreach ($values as $column => $value) {
            // @todo remove after testing
            if (!in_array($column, $this->columns['ezurlalias_ml'])) {
                throw new \Exception("unknown column '$column' for table 'ezurlalias_ml'");
            }
            switch ($column) {
                case 'text':
                case 'action':
                case 'text_md5':
                case 'action_type':
                    $pdoDataType = \PDO::PARAM_STR;
                    break;
                default:
                    $pdoDataType = \PDO::PARAM_INT;
            }
            $query->set(
                $this->dbHandler->quoteColumn($column),
                $query->bindValue($value, null, $pdoDataType)
            );
        }
    }
protected function setQueryValues(Query $query, $values)
    {
        foreach ($values as $column => $value) {
            // @todo remove after testing
            if (!in_array($column, $this->columns['ezurlalias_ml'])) {
                throw new \Exception("unknown column '$column' for table 'ezurlalias_ml'");
            }
            switch ($column) {
                case 'text':
                case 'action':
                case 'text_md5':
                case 'action_type':
                    $pdoDataType = \PDO::PARAM_STR;
                    break;
                default:
                    $pdoDataType = \PDO::PARAM_INT;
            }
            $query->set(
                $this->dbHandler->quoteColumn($column),
                $query->bindValue($value, null, $pdoDataType)
            );
        }
    }
protected function setQueryValues ( Query $ query , $ values ) { foreach ( $ values as $ column => $ value ) { // @todo remove after testing if ( ! in_array ( $ column , $ this -> columns [ 'ezurlalias_ml' ] ) ) { throw new \ Exception ( "unknown column '$column' for table 'ezurlalias_ml'" ) ; } switch ( $ column ) { case 'text' : case 'action' : case 'text_md5' : case 'action_type' : $ pdoDataType = \ PDO :: PARAM_STR ; break ; default : $ pdoDataType = \ PDO :: PARAM_INT ; } $ query -> set ( $ this -> dbHandler -> quoteColumn ( $ column ) , $ query -> bindValue ( $ value , null , $ pdoDataType ) ) ; } }
Sets value for insert or update query.

@param \eZ\Publish\Core\Persistence\Database\Query|\eZ\Publish\Core\Persistence\Database\InsertQuery|\eZ\Publish\Core\Persistence\Database\UpdateQuery $query
@param array $values

@throws \Exception
Sets value for insert or update query .