protected static function createConnection($name) { $config = array('driver' => 'sqlite', 'database' => ':memory:', 'prefix' => ''); $pdo = new PDO('sqlite::memory:'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $connection = new SQLiteConnection($pdo, $name, '', $config); $connection->setFetchMode(PDO::FETCH_CLASS); return $connection; }
/** * Set the default fetch mode for the connection. * * @param int $fetchMode * @return int * @static */ public static function setFetchMode($fetchMode) { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\SQLiteConnection::setFetchMode($fetchMode); }
/** * Set the default fetch mode for the connection, and optional arguments for the given fetch mode. * * @param int $fetchMode * @param mixed $fetchArgument * @param array $fetchConstructorArgument * @return int * @static */ public static function setFetchMode($fetchMode, $fetchArgument = null, $fetchConstructorArgument = array()) { //Method inherited from \Illuminate\Database\Connection return \Illuminate\Database\SQLiteConnection::setFetchMode($fetchMode, $fetchArgument, $fetchConstructorArgument); }