PHP 클래스 Kohana_MangoDB

파일 보기 프로젝트 열기: wouterrr/mangodb

공개 프로퍼티들

프로퍼티 타입 설명
$default default instance name
$instances Database instances

보호된 프로퍼티들

프로퍼티 타입 설명
$_config Configuration
$_connected Connected
$_connection Mongo object
$_db MongoDB object
$_name Instance name

공개 메소드들

메소드 설명
__toString ( )
aggregate ( $collection_name )
batch_insert ( $collection_name, array $a, array $options = [] ) Data Management
command ( array $data )
connect ( ) Connect to database
connected ( ) Returns connection status
count ( $collection_name, array $query = [] )
create_collection ( $name, $capped = FALSE, $size, $max ) Collection management
db ( )
disconnect ( ) Disconnect from database
drop_collection ( $name )
ensure_index ( $collection_name, $keys, $options = [] )
execute ( $code, array $args = [] )
find ( $collection_name, array $query = [], array $fields = [] )
find_one ( $collection_name, array $query = [], array $fields = [] )
get_file ( array $criteria = [] )
get_files ( array $query = [], array $fields = [] )
gridFS ( ) File management
group ( $collection_name, $keys, array $initial, $reduce, array $condition = [] )
insert ( $collection_name, array $a, $options = [] )
instance ( $name = NULL, array $config = NULL ) : Database Get a singleton MangoDB instance. If configuration is not specified, it will be loaded from the MangoDB configuration file using the same group as the name.
last_error ( ) Database Management
prev_error ( )
remove ( $collection_name, array $criteria, $options = [] )
remove_file ( array $criteria = [], array $options = [] )
reset_error ( )
save ( $collection_name, array $a, $options = [] )
set_file ( $filename, array $extra = [], array $options = [] )
set_file_bytes ( $bytes, array $extra = [], array $options = [] )
update ( $collection_name, array $criteria, array $newObj, $options = [] )

보호된 메소드들

메소드 설명
__construct ( $name, array $config )
_call ( $command, array $args = [], array $values = NULL ) All commands for which benchmarking could be useful are executed by this method

메소드 상세

__construct() 보호된 메소드

protected __construct ( $name, array $config )
$config array

__toString() 최종 공개 메소드

final public __toString ( )

_call() 보호된 메소드

This allows for easy benchmarking
protected _call ( $command, array $args = [], array $values = NULL )
$args array
$values array

aggregate() 공개 메소드

public aggregate ( $collection_name )

batch_insert() 공개 메소드

Data Management
public batch_insert ( $collection_name, array $a, array $options = [] )
$a array
$options array

command() 공개 메소드

public command ( array $data )
$data array

connect() 공개 메소드

Connect to database
public connect ( )

connected() 공개 메소드

Returns connection status
public connected ( )

count() 공개 메소드

public count ( $collection_name, array $query = [] )
$query array

create_collection() 공개 메소드

Collection management
public create_collection ( $name, $capped = FALSE, $size, $max )

db() 공개 메소드

public db ( )

disconnect() 공개 메소드

Disconnect from database
public disconnect ( )

drop_collection() 공개 메소드

public drop_collection ( $name )

ensure_index() 공개 메소드

public ensure_index ( $collection_name, $keys, $options = [] )

execute() 공개 메소드

public execute ( $code, array $args = [] )
$args array

find() 공개 메소드

public find ( $collection_name, array $query = [], array $fields = [] )
$query array
$fields array

find_one() 공개 메소드

public find_one ( $collection_name, array $query = [], array $fields = [] )
$query array
$fields array

get_file() 공개 메소드

public get_file ( array $criteria = [] )
$criteria array

get_files() 공개 메소드

public get_files ( array $query = [], array $fields = [] )
$query array
$fields array

gridFS() 공개 메소드

File management
public gridFS ( )

group() 공개 메소드

public group ( $collection_name, $keys, array $initial, $reduce, array $condition = [] )
$initial array
$condition array

insert() 공개 메소드

public insert ( $collection_name, array $a, $options = [] )
$a array

instance() 공개 정적인 메소드

Load the default database $db = MangoDB::instance(); Create a custom configured instance $db = MangoDB::instance('custom', $config);
public static instance ( $name = NULL, array $config = NULL ) : Database
$config array
리턴 Database

last_error() 공개 메소드

Database Management
public last_error ( )

prev_error() 공개 메소드

public prev_error ( )

remove() 공개 메소드

public remove ( $collection_name, array $criteria, $options = [] )
$criteria array

remove_file() 공개 메소드

public remove_file ( array $criteria = [], array $options = [] )
$criteria array
$options array

reset_error() 공개 메소드

public reset_error ( )

save() 공개 메소드

public save ( $collection_name, array $a, $options = [] )
$a array

set_file() 공개 메소드

public set_file ( $filename, array $extra = [], array $options = [] )
$extra array
$options array

set_file_bytes() 공개 메소드

public set_file_bytes ( $bytes, array $extra = [], array $options = [] )
$extra array
$options array

update() 공개 메소드

public update ( $collection_name, array $criteria, array $newObj, $options = [] )
$criteria array
$newObj array

프로퍼티 상세

$_config 보호되어 있는 프로퍼티

Configuration
protected $_config

$_connected 보호되어 있는 프로퍼티

Connected
protected $_connected

$_connection 보호되어 있는 프로퍼티

Mongo object
protected $_connection

$_db 보호되어 있는 프로퍼티

MongoDB object
protected $_db

$_name 보호되어 있는 프로퍼티

Instance name
protected $_name

$default 공개적으로 정적으로 프로퍼티

default instance name
public static $default

$instances 공개적으로 정적으로 프로퍼티

Database instances
public static $instances