0 フォロワー

Final クラス yii\db\PdoValue

継承yii\db\PdoValue
実装yii\db\ExpressionInterface
利用可能バージョン2.0.14
ソースコード https://github.com/yiisoft/yii2/blob/master/framework/db/PdoValue.php

クラス PdoValue は、正確な $type で PDO にバインドされる必要がある $value を表します。

たとえば、DBMS の BLOB カラムにバイナリデータをバインドする必要がある場合に役立ちます。

[':name' => 'John', ':profile' => new PdoValue($profile, \PDO::PARAM_LOB)]`.

可能な型については、PDO::PARAM_* 定数を参照してください。

また、https://www.php.net/manual/en/pdostatement.bindparam.php を参照してください。

公開メソッド

継承されたメソッドを非表示

メソッド 説明 定義元
__construct() PdoValue コンストラクタ。 yii\db\PdoValue
getType() yii\db\PdoValue
getValue() yii\db\PdoValue

メソッド詳細

継承されたメソッドを非表示

__construct() public method

PdoValue コンストラクタ。

public void __construct ( $value, $type )
$value
$type

                public function __construct($value, $type)
{
    $this->value = $value;
    $this->type = $type;
}

            
getType() public method

public integer getType ( )

                public function getType()
{
    return $this->type;
}

            
getValue() public method

public mixed getValue ( )

                public function getValue()
{
    return $this->value;
}