Method |
Description |
|
__construct ( $data = [], $config = [] ) |
|
|
__get ( $property ) : mixed |
Get a property |
|
__isset ( string $property ) |
Test to see if a property is set |
|
__set ( string $property, mixed $value ) |
Set a property |
|
__unset ( string $property ) |
Unset a property |
|
_getMongoCollection ( boolean $writable = true ) : MongoCollection |
Fetch an instance of MongoCollection |
|
_getMongoDb ( boolean $writable = true ) : MongoDb |
Fetch an instance of MongoDb |
|
addOperation ( string $operation, $property = null, $value = null ) |
Add an operation |
|
addRequirement ( string $property, string $requirement, $options = null ) |
Add a requirement to a property |
|
addToSet ( $property, $value ) |
*
Adds value to the array only if its not in the array already. |
|
applyRequirements ( array $requirements, $dirty = true ) |
Apply a set of requirements |
|
count ( ) : integer |
Count all properties in this document |
|
createReference ( ) : array |
Create a reference to this document |
|
delete ( $safe = true ) |
Delete this document |
|
export ( $skipRequired = false ) : array |
Export all data |
|
getConfigAttribute ( string $attribute ) |
Get a config attribute |
|
getCriteria ( string $property = null ) : mixed |
Get criteria |
|
getFilters ( String $property ) : Zend_Filter |
Get all filters attached to a property |
|
getId ( ) : MongoId |
Get this document's id |
|
getInheritance ( ) : array |
Get the inheritance of this document |
|
getIterator ( ) : Shanty_Mongo_DocumentIterator |
Get the document iterator |
|
getOperations ( boolean $includingChildren = false ) |
Get all operations |
|
getPathToDocument ( ) : string |
Get the path to this document from the root document |
|
getPathToProperty ( $property ) : string |
Get the full path from the root document to a property |
|
getPropertiesWithRequirement ( array $requirement ) |
Get all the properties with a particular requirement |
|
getProperty ( mixed $property ) |
Get a property |
|
getPropertyKeys ( ) |
Get a list of all property keys in this document |
|
getRequirements ( string $prefix = null ) |
Get all requirements. If prefix is provided then only the requirements for
the properties that start with prefix will be returned. |
|
getValidators ( String $property ) : Zend_Validate |
Get all validators attached to a property |
|
hasConfigAttribute ( string $attribute ) |
Determine if a config attribute is set |
|
hasCriteria ( $property ) : boolean |
Determine if the document has certain criteria |
|
hasId ( ) : boolean |
Does this document have an id |
|
hasKey ( ) : boolean |
Determine if this document has a key |
|
hasProperty ( $property ) : boolean |
Determine if this document has a property |
|
hasReference ( $referenceName ) : boolean |
Determine if the document has a given reference or not |
|
hasRequirement ( string $property, string $requirement ) |
Test if this document has a particular requirement |
|
inc ( string $property, integer $value = 1 ) |
Increment a property by a specified amount |
|
isConnected ( ) |
Is this document connected to a db and collection |
|
isEmpty ( ) : boolean |
Test to see if this document is empty |
|
isLocked ( ) : boolean |
Is this document locked |
|
isNewDocument ( ) : boolean |
Is this document a new document |
|
isParentDocumentSet ( ) : boolean |
Is this document a child element of a document set |
|
isReference ( Shanty_Mongo_Document $document ) : boolean |
Test to see if a document is a reference in this document |
|
isRootDocument ( ) : boolean |
Is this document a root document |
|
isValid ( String $property, boolean $value ) |
Test if a value is valid against a property |
|
loadRequirements ( String $property ) : boolean |
Load the requirements as validators or filters for a given property,
and cache them as validators or filters, respectively. |
|
offsetExists ( string $offset ) |
Test to see if an offset exists |
|
offsetGet ( string $offset ) : mixed |
Get an offset |
|
offsetSet ( string $offset, mixed $value ) |
set an offset |
|
offsetUnset ( string $offset ) |
Unset a property |
|
pop ( $property, $value ) |
*
Removes an element from an array |
|
processChanges ( array $data = [] ) |
Convert data changes into operations |
|
pull ( string $property, mixed $value ) |
Pull all occurrences a value from an array |
|
purgeOperations ( boolean $includingChildren = false ) |
Remove all operations |
|
push ( string $property = null, mixed $value = null ) |
Push a value to a property |
|
removeIgnoredProperties ( &$exportData ) : void |
Removes any properties that have been flagged as ignore in properties. |
|
removeRequirement ( string $property, string $requirement ) |
Remove a requirement from a property |
|
save ( boolean $entierDocument = false, boolean $safe = true ) : boolean |
Save this document |
|
saveUnsafe ( boolean $entierDocument = false ) : boolean |
Save this document without waiting for a response from the server |
|
setConfigAttribute ( string $attribute, unknown_type $value ) |
Set a config attribute |
|
setCriteria ( string $property = null, $value = null ) |
Add criteria |
|
setId ( MongoId $id ) : MongoId |
Set this document's id |
|
setPathToDocument ( unknown_type $path ) |
Set the path to this document from the root document |
|
setProperty ( mixed $property, mixed $value ) |
Set a property |
|