yii2-arangodb/ArangoDbConnection.php

20 lines
475 B
PHP
Raw Normal View History

2014-06-16 13:49:22 +08:00
<?php
2014-06-16 13:54:56 +08:00
namespace devgroup\arangodb;
2014-06-16 13:49:22 +08:00
2014-07-29 13:33:21 +08:00
use \triagens\ArangoDb\ConnectionOptions;
2014-06-16 13:49:22 +08:00
2014-07-29 13:33:21 +08:00
class ArangoDbConnection extends \triagens\ArangoDb\Connection
{
public function json_encode_wrapper($data, $options = null)
2014-06-16 13:49:22 +08:00
{
2014-07-29 13:33:21 +08:00
if ($this->getOption(ConnectionOptions::OPTION_CHECK_UTF8_CONFORM) === true) {
self::check_encoding($data);
}
$response = json_encode($data, $options | JSON_FORCE_OBJECT);
return $response;
2014-06-16 13:49:22 +08:00
}
2014-07-29 13:33:21 +08:00
}