Final Class yii\db\PdoValue
| 继承 | yii\db\PdoValue |
|---|---|
| 实现 | yii\db\ExpressionInterface |
| 可用版本自 | 2.0.14 |
| 源码 | https://github.com/yiichina/yii2/blob/api/framework/db/PdoValue.php |
类 PdoValue 表示应该使用确切的 $type 绑定到 PDO 的一个 $value。
例如,当您需要将二进制数据绑定到 DBMS 中的 BLOB 列时,它将会非常有用:
[':name' => 'John', ':profile' => new PdoValue($profile, \PDO::PARAM_LOB)]`.
要查看可能的类型,请参考 PDO::PARAM_* constants。
公共方法
| 方法 | 描述 | 被定义在 |
|---|---|---|
| __construct() | PdoValue 构造函数。 | yii\db\PdoValue |
| getType() | yii\db\PdoValue | |
| getValue() | yii\db\PdoValue |
方法详情
PdoValue 构造函数。
| public void __construct($value, $type) | ||
| $value | ||
| $type | ||
| public integer getType() |
| public mixed getValue() |