PHP Class MongoLite\Database

Afficher le fichier Open project: aheinze/mongo-lite

Méthodes publiques

Свойство Type Description
$connection object

Protected Properties

Свойство Type Description
$collections array
$document_criterias array
$path string

Méthodes publiques

Méthode Description
__construct ( string $path = ":memory:", array $options = [] ) Constructor
__get ( $collection )
callCriteriaFunction ( string $id, array $document ) : boolean Execute registred criteria function
createCollection ( string $name ) Create a collection
drop ( ) Drop database
dropCollection ( string $name ) Drop a collection
getCollectionNames ( ) : array Get all collection names in the database
listCollections ( ) : array Get all collections in the database
registerCriteriaFunction ( mixed $criteria ) : mixed Register Criteria function
selectCollection ( string $name ) : object Select collection
vacuum ( ) Vacuum database

Method Details

__construct() public méthode

Constructor
public __construct ( string $path = ":memory:", array $options = [] )
$path string
$options array

__get() public méthode

public __get ( $collection )

callCriteriaFunction() public méthode

Execute registred criteria function
public callCriteriaFunction ( string $id, array $document ) : boolean
$id string
$document array
Résultat boolean

createCollection() public méthode

Create a collection
public createCollection ( string $name )
$name string

drop() public méthode

Drop database
public drop ( )

dropCollection() public méthode

Drop a collection
public dropCollection ( string $name )
$name string

getCollectionNames() public méthode

Get all collection names in the database
public getCollectionNames ( ) : array
Résultat array

listCollections() public méthode

Get all collections in the database
public listCollections ( ) : array
Résultat array

registerCriteriaFunction() public méthode

Register Criteria function
public registerCriteriaFunction ( mixed $criteria ) : mixed
$criteria mixed
Résultat mixed

selectCollection() public méthode

Select collection
public selectCollection ( string $name ) : object
$name string
Résultat object

vacuum() public méthode

Vacuum database
public vacuum ( )

Property Details

$collections protected_oe property

protected array $collections
Résultat array

$connection public_oe property

object
public $connection

$document_criterias protected_oe property

protected array $document_criterias
Résultat array

$path protected_oe property

protected string $path
Résultat string