データベースの型に対する\PDO::PARAM_*を返します。

@return	array	データベースの型に対する\PDO::PARAM_*のリスト
551793
public static function GetPdoParamList () {
		return [
			//数値
			'INTEGER'			=> \PDO::PARAM_INT,
			'NUMERIC'			=> \PDO::PARAM_STR,
			'REAL'				=> \PDO::PARAM_STR,
			//文字・文字列
			'TEXT'				=> \PDO::PARAM_STR,
			//バイナリ
			'NONE'				=> \PDO::PARAM_LOB,
		];
	}
1000472
public function getParams()
    {
        //exit early if no types are set
        if (empty($this->types)) {
            return $this->params;
        }

        $params = [];
        $num_params = count($this->params);
        for ($i = 0; $i < $num_params; $i++) {
            $value = $this->params[$i];
            $column = $this->param_columns[$i];

            if (isset($this->types[$column])) {
                $params[] = $this->connection->convertToDatabaseValue($value, $this->types[$column]);
                continue;
            }
            $params[] = $value;
        }

        return $params;
    }
790959
protected static function getParams(array $arg_params)
    {
        $return = array();
        //validate params
        $data = array(
            'amount',
            'transaction_id',
            'customer_id',
            'security_token',
            'customer_ip'
        );
        foreach ($data as $key) {
            if(!empty($arg_params[$key])){
                $return[$key] = $arg_params[$key];
            }
        }

        return $return;
    }
941808
public function queryParameters() {
		if(!$this->configured || $this->via != self::QUERY_PARAMETER)
			return array();
		
		return array($this->description->query_parameter => $this->token);
	}
889837
public function getPdo()
    {
        if (!$this->pdo) {
            $this->connect();
        }

        $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        $this->pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);

        return $this->pdo;
    }
361807
static public function getAvailableAdapters()
    {
        $pdoAdapters = (class_exists('Pdo', false)) ? \PDO::getAvailableDrivers() : array();

        return array(
            'mysql'  => (class_exists('mysqli', false)),
            'oracle' => (function_exists('oci_connect')),
            'pdo'    => array(
                'mysql'  => (in_array('mysql', $pdoAdapters)),
                'pgsql'  => (in_array('pgsql', $pdoAdapters)),
                'sqlite' => (in_array('sqlite', $pdoAdapters)),
                'sqlsrv' => (in_array('sqlsrv', $pdoAdapters))
            ),
            'pgsql'  => (function_exists('pg_connect')),
            'sqlite' => (class_exists('Sqlite3', false)),
            'sqlsrv' => (function_exists('sqlsrv_connect'))
        );
    }
696125
public function whereParameters()
    {
        return array_filter(
            $this->queryParameters,
            function ($queryParameter) {
                $key = $queryParameter['key'];
                return (! in_array($key, $this->predefinedParams));
            }
        );
    }
374487
protected function getConnectionParameters()
    {
        /** Collect the parameters, that are necessary to initialize the database connection: */

        /**
         * @var string $databaseDriver At the moment the database adapter uses always 'pdo_mysql'.
         */
        $databaseDriver = $this->getConfigParam('dbType');
        /**
         * @var string $databaseHost The database host to connect to.
         * Be aware, that the connection between the MySQL client and the server is unencrypted.
         */
        $databaseHost = $this->getConfigParam('dbHost');
        /**
         * @var integer $databasePort TCP port to connect to.
         */
        $databasePort = (int) $this->getConfigParam('dbPort');
        if (!$databasePort) {
            $databasePort = 3306;
        }
        /**
         * @var string $databaseName The name of the database or scheme to connect to.
         */
        $databaseName = $this->getConfigParam('dbName');
        /**
         * @var string $databaseUser The user id of the database user.
         */
        $databaseUser = $this->getConfigParam('dbUser');
        /**
         * @var string $databasePassword The password of the database user.
         */
        $databasePassword = $this->getConfigParam('dbPwd');

        $connectionParameters = [
            'default' => [
                'databaseDriver'    => $databaseDriver,
                'databaseHost'      => $databaseHost,
                'databasePort'      => $databasePort,
                'databaseName'      => $databaseName,
                'databaseUser'      => $databaseUser,
                'databasePassword'  => $databasePassword,
            ]
        ];

        /**
         * The charset has to be set during the connection to the database.
         */
        $charset = (string) $this->getConfigParam('dbCharset');
        //backwards compatibility with old config files.
        if (null == $charset) {
            $charset = 'utf8';
        }
        
        $connectionParameters['default'] = array_merge($connectionParameters['default'], ['connectionCharset' => $charset]);

        return $connectionParameters;
    }
71399
public function getSupportedParams()
    {
        return [
            self::PARAM_INCLUSIONS  => true,
            self::PARAM_FIELDSETS   => true,
            self::PARAM_SORTING     => true,
            self::PARAM_PAGINATION  => true,
            self::PARAM_FILTERING   => true,
        ];
    }
264482
public function compileParameters(): array
    {
        $return = [
            'query' => [],
            'resource_id' => $this->resourceId,
        ];

        if ($this->filterBy) {
            $return['query']['filter_by'] = $this->filterBy;
        }

        if ($this->sortBy) {
            $return['query']['sort_by'] = $this->sortBy;
        }

        if ($this->fieldList) {
            $return['query']['field_list'] = $this->fieldList;
        }

        if ($this->parameters) {
            foreach ($this->parameters as $name => $value) {
                $return['query'][$name] = $value;
            }
        }

        return $return;
    }
1147549
public function getFilterParameters()
    {
        $parameters = parent::getFilterParameters();

        // build the values array
        if ($this->hasRequest()) {
            /** @var Request $request */
            $request = $this->getRequest();

            $parentAssociationMapping = $this->getParentAssociationMapping();

            // always force the parent value
            if ($parentAssociationMapping && $this->isChild()) {
                /** @var \Sonata\AdminBundle\Admin\AbstractAdmin $parent */
                $parent = $this->getParent();

                $name = str_replace('.', '__', $parentAssociationMapping);

                $idParameter = $parent->getIdParameter();

                $parameters[$name] = ['value' => $request->get($idParameter)];

                if (ClassMetadataInfo::MANY_TO_MANY === $this->getParentAssociationMappingType()) {
                    $parameters[$name] = ['value' => [$request->get($idParameter)]];
                }
            }
        }

        return $parameters;
    }
1293222
public function execute(array $params = []) : array
    {
        foreach ($params as $paramName => $paramValue) {
            $type = is_int($paramValue) ? \PDO::PARAM_INT : \PDO::PARAM_STR;
            $this->getStatement()->bindValue($paramName, $paramValue, $type);
        }
        $this->getStatement()->execute();

        return $this->getStatement()->fetchAll(\PDO::FETCH_ASSOC);
    }
899900
public function getParams(): array
    {
        $params = [
            'callback_query_id' => $this->callbackQueryId,
        ];

        $params = array_merge($params, $this->buildJsonAttributes([
            'show_alert' => $this->showAlert,
            'cache_time' => $this->cacheTime
        ]));

        return $params;
    }
452985
protected function getParamsKey()
    {
        return array(
            self::PARAM_DRIVER_OPTIONS,
            self::PARAM_HOST,
            self::PARAM_DATABASE,
            self::PARAM_USER,
            self::PARAM_PASSWORD,
        );
    }
1042855
public static function getConection() : \PDO
    {
        if (self::$instance === null) {
            $con = self::findData();
            self::$instance = new \PDO("mysql:host=".$con['HOST'].";dbname=".$con['DBNAME'], $con['USER'], $con['PASS']);
            self::$instance->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
                
        }
        return self::$instance;
    }
109623
public function get()
    {
        $sql = "SELECT * FROM `$this->_table` ";

        $this->_param_list = array();

        if (!empty($this->_where_list)) {
            $sql .= "WHERE ";
            $first = true;
            foreach ($this->_where_list as $field_name => $field_settings) {
                $type          = isset($field_settings['type']) ? $field_settings['type'] : false;
                $field_value   = $field_settings['value'];
                $field_connect = isset($field_settings['op']) ? $field_settings['op'] : ' AND ';

                switch ($type) {
                    case 'like':
                        $sql .= ($first !== true ? "$field_connect" : "") . "$field_name like '%:$field_name%'";
                        $this->_param_list[] = array(":$field_name", $field_value);
                        break;
                    case 'in':
                        $sql .= ($first !== true ? "$field_connect" : "") . "$field_name IN (:$field_name)";
                        $this->_param_list[] = array(":$field_name", $field_value);
                        break;
                    default:
                        $sql .= ($first !== true ? "$field_connect" : "") . "$field_name = :$field_name";
                        $this->_param_list[] = array(":$field_name", $field_value);
                        break;
                }

                // we can assume that after the first iteration it's false
                $first = false;
            }
        }
        unset($field_connect, $field_name, $field_value, $type, $field_settings);

        if (!empty($this->_group)) {
            if (is_array($this->_group)) {
                $this->_limit = implode(',', $this->_group_by);
            }

            $sql .= ' GROUP BY ' . $this->_group_by;
        }

        if (!empty($this->_limit)) {
            if (is_array($this->_limit)) {
                $this->_limit = implode(',', $this->_limit);
            }

            $sql .= ' LIMIT ' . $this->_limit;
        }

        $this->last_sql = $sql;

        $this->__init_database();

        $stmt = $this->db->prepare($sql);
        // set the prepared statement
        for ($i = 0, $c = count($this->_param_list); $i < $c; $i++) {
            $stmt->bindParam($this->_param_list[$i][0], $this->_param_list[$i][1]);
        }


        if (!$stmt->execute()) return;

        $this->result = $stmt->fetchAll(MySQL::FETCH_OBJ);
    }
1237991
public function get(): array
    {
        $pdoStatement = $this->provideStatement();
        $pdoStatement = $this->execute($pdoStatement);
        return $pdoStatement->fetchAll(\PDO::FETCH_OBJ);
    }