Ouzo\Db\PDOExecutor::newInstance PHP Method

newInstance() public static method

public static newInstance ( $options )
    public static function newInstance($options)
    {
        if (Arrays::getValue($options, Options::EMULATE_PREPARES)) {
            return new EmulatedPDOPreparedStatementExecutor();
        }
        return new PDOPreparedStatementExecutor();
    }

Usage Example

コード例 #1
0
ファイル: StatementExecutor.php プロジェクト: letsdrink/ouzo
 public static function prepare($dbHandle, $sql, $boundValues, $options)
 {
     $pdoExecutor = PDOExecutor::newInstance($options);
     return new StatementExecutor($dbHandle, $sql, $boundValues, $pdoExecutor);
 }