PHP 클래스 MongoLite\Collection

파일 보기 프로젝트 열기: aheinze/mongo-lite

공개 프로퍼티들

프로퍼티 타입 설명
$database Database
$name string

공개 메소드들

메소드 설명
__construct ( string $name, object $database ) Constructor
count ( mixed $criteria = null ) : integer Count documents in collections
drop ( ) Drop collection
find ( mixed $criteria = null, $projection = null ) : object Find documents
findOne ( mixed $criteria = null, $projection = null ) : array Find one document
insert ( array &$document ) : mixed Insert document
remove ( mixed $criteria ) : mixed Remove documents
renameCollection ( string $newname ) : boolean Rename Collection
save ( array &$document ) : mixed Save document
update ( mixed $criteria, array $data ) : integer Update documents

보호된 메소드들

메소드 설명
_insert ( array &$document ) : mixed Insert document

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $name, object $database )
$name string
$database object

_insert() 보호된 메소드

Insert document
protected _insert ( array &$document ) : mixed
$document array
리턴 mixed

count() 공개 메소드

Count documents in collections
public count ( mixed $criteria = null ) : integer
$criteria mixed
리턴 integer

drop() 공개 메소드

Drop collection
public drop ( )

find() 공개 메소드

Find documents
public find ( mixed $criteria = null, $projection = null ) : object
$criteria mixed
리턴 object Cursor

findOne() 공개 메소드

Find one document
public findOne ( mixed $criteria = null, $projection = null ) : array
$criteria mixed
리턴 array

insert() 공개 메소드

Insert document
public insert ( array &$document ) : mixed
$document array
리턴 mixed last_insert_id for single document or count count of inserted documents for arrays

remove() 공개 메소드

Remove documents
public remove ( mixed $criteria ) : mixed
$criteria mixed
리턴 mixed

renameCollection() 공개 메소드

Rename Collection
public renameCollection ( string $newname ) : boolean
$newname string [description]
리턴 boolean

save() 공개 메소드

Save document
public save ( array &$document ) : mixed
$document array
리턴 mixed

update() 공개 메소드

Update documents
public update ( mixed $criteria, array $data ) : integer
$criteria mixed
$data array
리턴 integer

프로퍼티 상세

$database 공개적으로 프로퍼티

Database
public $database

$name 공개적으로 프로퍼티

public string $name
리턴 string