PHP Class Phalcon\Mvc\MongoCollection

Inheritance: extends Phalcon\Mvc\Collection, implements MongoDB\BSON\Unserializable
Show file Open project: phalcon/incubator

Protected Properties

Property Type Description
$_disableEvents @codingStandardsIgnoreStart

Public Methods

Method Description
bsonUnserialize ( array $data ) Pass the values from the BSON document back to the object.
delete ( ) Deletes a model instance. Returning true on success or false otherwise.
findById ( $id )
findFirst ( array $parameters = null )
fireEventCancel ( string $eventName ) : boolean Fires an internal event that cancels the operation
save ( ) Creates/Updates a collection based on the values in the attributes
setId ( mixed $id ) Sets a value for the _id property, creates a MongoId object if needed
summatory ( $field, $conditions = null, $finalize = null )

Protected Methods

Method Description
_exists ( $collection ) @codingStandardsIgnoreStart
_getResultset ( $params, Phalcon\Mvc\CollectionInterface $collection, $connection, $unique ) @codingStandardsIgnoreStart

Method Details

_exists() protected method

@codingStandardsIgnoreStart
protected _exists ( $collection )

_getResultset() protected static method

@codingStandardsIgnoreStart
protected static _getResultset ( $params, Phalcon\Mvc\CollectionInterface $collection, $connection, $unique )
$collection Phalcon\Mvc\CollectionInterface

bsonUnserialize() public method

Pass the values from the BSON document back to the object.
public bsonUnserialize ( array $data )
$data array

delete() public method

$robot = Robots::findFirst(); $robot->delete(); foreach (Robots::find() as $robot) { $robot->delete(); }
public delete ( )

findById() public static method

public static findById ( $id )

findFirst() public static method

public static findFirst ( array $parameters = null )
$parameters array

fireEventCancel() public method

Fires an internal event that cancels the operation
public fireEventCancel ( string $eventName ) : boolean
$eventName string
return boolean

save() public method

Creates/Updates a collection based on the values in the attributes
public save ( )

setId() public method

Sets a value for the _id property, creates a MongoId object if needed
public setId ( mixed $id )
$id mixed

summatory() public static method

public static summatory ( $field, $conditions = null, $finalize = null )

Property Details

$_disableEvents protected static property

@codingStandardsIgnoreStart
protected static $_disableEvents