Prepare the values for PDO.

@param string $pType
@param string $pValue
@param string $pPrepared
518296
private function _processTypeValue($pType, $pValue, &$pPrepared)
    {
        if (is_array($pValue)) {
            foreach($pValue as $subValue) {
                $pPrepared[] = (string)$subValue;
            }
        } else if ($pValue !== NULL) {
            $pPrepared[] = $pValue;
        }
    }
1259135
public function setStartColor(PHPExcel_Style_Color $pValue = null)
    {
        // make sure parameter is a real color and not a supervisor
        $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;

        if ($this->isSupervisor) {
            $styleArray = $this->getStartColor()->getStyleArray(array('argb' => $color->getARGB()));
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
        } else {
            $this->startColor = $color;
        }
        return $this;
    }
721870
private function _writeLine($pFileHandle = null, $pValues = null) {
		if (is_array($pValues)) {
			// No leading delimiter
			$writeDelimiter = false;

			// Build the line
			$line = '';

			foreach ($pValues as $element) {
				// Escape enclosures
				$element = str_replace($this->_enclosure, $this->_enclosure . $this->_enclosure, $element);

				// Add delimiter
				if ($writeDelimiter) {
					$line .= $this->_delimiter;
				} else {
					$writeDelimiter = true;
				}

				// Add enclosed string
				$line .= $this->_enclosure . $element . $this->_enclosure;
			}

			// Add line ending
			$line .= $this->_lineEnding;

			// Write to file
            fwrite($pFileHandle, $line);
		} else {
			throw new PHPExcel_Writer_Exception("Invalid data row passed to CSV writer.");
		}
	}
151838
public function bindValue($parameter, $value, $data_type = \PDO::PARAM_STR) {
        $this->_debugBindValues[$parameter] = $value;
        parent::bindValue($parameter, $value, $data_type);
    }
97623
public static function setAutoSizeMethod($pValue = self::AUTOSIZE_METHOD_APPROX)
	{
		if (!in_array($pValue,self::$_autoSizeMethods)) {
			return FALSE;
		}

		self::$autoSizeMethod = $pValue;

		return TRUE;
	}
511783
public static function set($pKey, $pValue)
    {
        if (array_key_exists($pKey, self::$_registry)) {
            throw new Exception("The registry key '$pKey' already exists");
        }

        return self::$_registry[$pKey] = $pValue;
    }
1175539
public void setNextByte(final byte[] pValue, final int pLength, final boolean pPadBefore) {
		int totalSize = (int) Math.ceil(pLength / BYTE_SIZE_F);
		ByteBuffer buffer = ByteBuffer.allocate(totalSize);
		int size = Math.max(totalSize - pValue.length, 0);
		if (pPadBefore) {
			for (int i = 0; i < size; i++) {
				buffer.put((byte) 0);
			}
		}
		buffer.put(pValue, 0, Math.min(totalSize, pValue.length));
		if (!pPadBefore) {
			for (int i = 0; i < size; i++) {
				buffer.put((byte) 0);
			}
		}
		byte tab[] = buffer.array();
		if (currentBitIndex % BYTE_SIZE != 0) {
			int index = 0;
			int max = currentBitIndex + pLength;
			while (currentBitIndex < max) {
				int mod = currentBitIndex % BYTE_SIZE;
				int modTab = index % BYTE_SIZE;
				int length = Math.min(max - currentBitIndex, Math.min(BYTE_SIZE - mod, BYTE_SIZE - modTab));
				byte val = (byte) (tab[index / BYTE_SIZE] & getMask(modTab, length));
				if (mod == 0) {
					val = (byte) (val << Math.min(modTab, BYTE_SIZE - length));
				} else {
					val = (byte) ((val & DEFAULT_VALUE) >> mod);
				}
				byteTab[currentBitIndex / BYTE_SIZE] |= val;
				currentBitIndex += length;
				index += length;
			}

		} else {
			System.arraycopy(tab, 0, byteTab, currentBitIndex / BYTE_SIZE, tab.length);
			currentBitIndex += pLength;
		}
	}
719095
public function prepare($query, $pdo_params=[]){
    if(!$this->connection()) return false;
    return isset($this->queries[$query]) ? $this->queries[$query] : ($this->queries[$query] = $this->connection()->prepare($query, $pdo_params));
  }
939351
public function setCreated($pValue = null) {
		if (is_null($pValue)) {
			$pValue = time();
		}
		$this->_created = $pValue;
		return $this;
	}
860122
protected function doInsert(PropelPDO $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[] = SystemSettingsPeer::ID;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . SystemSettingsPeer::ID . ')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(SystemSettingsPeer::ID)) {
            $modifiedColumns[':p' . $index++]  = '`id`';
        }
        if ($this->isColumnModified(SystemSettingsPeer::KEY)) {
            $modifiedColumns[':p' . $index++]  = '`key`';
        }
        if ($this->isColumnModified(SystemSettingsPeer::VALUE)) {
            $modifiedColumns[':p' . $index++]  = '`value`';
        }

        $sql = sprintf(
            'INSERT INTO `system_settings` (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case '`id`':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case '`key`':
                        $stmt->bindValue($identifier, $this->key, PDO::PARAM_STR);
                        break;
                    case '`value`':
                        $stmt->bindValue($identifier, $this->value, PDO::PARAM_STR);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
1183952
public void setServerInfo(String pVendor, String pProduct, String pVersion) {
        checkSeal();
        serverVendor = pVendor;
        serverProduct = pProduct;
        serverVersion = pVersion;
    }
813843
private function prepare()
    {
        $params = [];

        foreach ($this->variables as $column => &$variable) {
            switch ($this->types[$column]) {
                case ParameterType::LARGE_OBJECT:
                    $params[$column - 1] = [
                        &$variable,
                        SQLSRV_PARAM_IN,
                        SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY),
                        SQLSRV_SQLTYPE_VARBINARY('max'),
                    ];
                    break;

                case ParameterType::BINARY:
                    $params[$column - 1] = [
                        &$variable,
                        SQLSRV_PARAM_IN,
                        SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_BINARY),
                    ];
                    break;

                default:
                    $params[$column - 1] =& $variable;
                    break;
            }
        }

        $stmt = sqlsrv_prepare($this->conn, $this->sql, $params);

        if (! $stmt) {
            throw SQLSrvException::fromSqlSrvErrors();
        }

        return $stmt;
    }
117100
private function _processTypeCondition($pField, $pType, $pValue)
    {
        $escapedField = '`' . $pField . '`';

        switch ($pType) {
            case self::IN:
            case self::NOTIN:
                if (is_array($pValue)) {
                    $markers = '?' . str_repeat(', ?', count($pValue) - 1);
                    return sprintf($pType, $escapedField, $markers);
                }
                break;
            case self::INSET:
                return sprintf($pType, '?', $escapedField);
                break;
            default:
                if ($pValue !== NULL) {
                    return sprintf($pType, $escapedField, '?');
                } else {
                    return sprintf($pType, $escapedField);
                }
        }
    }
746715
public function bindParam(
        $parameter,
        &$variable,
        $data_type = PDO::PARAM_STR,
        $length = -1,
        $driver_options = null
    )
    {
        if ($driver_options !== null) {
            throw new PDOException('$driver_options is not implemented for PoolPDOStatement::bindParam()');
        }
        if (is_array($variable)) {
            if ($length == -1) {
                $length = count($variable);
            }
        } else {
            if ($length == -1) {
                $length = strlen((string)$variable);
            }
        }
        $this->_boundColumns[$parameter] = $variable;
        return true;
    }
926805
public function setName($pValue = 'Calibri') {
  		if ($pValue == '') {
			$pValue = 'Calibri';
		}
		if ($this->_isSupervisor) {
			$styleArray = $this->getStyleArray(array('name' => $pValue));
			$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
		} else {
			$this->_name = $pValue;
		}
		return $this;
	}
954436
public function setModified($pValue = null)
    {
        if ($pValue === null) {
            $pValue = time();
        } elseif (is_string($pValue)) {
            if (is_numeric($pValue)) {
                $pValue = intval($pValue);
            } else {
                $pValue = strtotime($pValue);
            }
        }

        $this->modified = $pValue;
        return $this;
    }
390460
protected function doInsert(PropelPDO $con)
    {
        $modifiedColumns = array();
        $index = 0;


         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(UserRolePeer::USER_ID)) {
            $modifiedColumns[':p' . $index++]  = '`user_id`';
        }
        if ($this->isColumnModified(UserRolePeer::ROLE_ID)) {
            $modifiedColumns[':p' . $index++]  = '`role_id`';
        }

        $sql = sprintf(
            'INSERT INTO `user_role` (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case '`user_id`':
                        $stmt->bindValue($identifier, $this->user_id, PDO::PARAM_INT);
                        break;
                    case '`role_id`':
                        $stmt->bindValue($identifier, $this->role_id, PDO::PARAM_INT);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), $e);
        }

        $this->setNew(false);
    }