\MongoDataObject
MongoDataObject
This is an example implementation with a MongoDB as the external datasource
You need the PHP MongoDB extension loaded to run this example
http://www.php.net/manual/en/book.mongo.php
Synopsis
class MongoDataObject
extends ExternalDataObject
{
- // members
- public static array $db = ;
- public static array $summary_fields = ;
- // Inherited members from ExternalDataObject
- public static array $db;
- protected $record;
- protected static array $_cache_db;
- protected static $_cache_get_one;
- protected static array $_cache_field_labels;
- protected static array $_cache_composite_fields;
- // methods
- public static void collection()
- public void getID()
- public static void get()
- public static void get_by_id()
- public void write()
- public void delete()
- public static void delete_by_id()
- // Inherited methods from ExternalDataObject
- public void __construct()
- public static void is_composite_field()
- public void __get()
- public void __set()
- public static void get()
- public void getID()
- public void getTitle()
- public void getCMSFields()
- public void getFrontEndFields()
- public void scaffoldFormFields()
- public void db()
- public void dbObject()
- public void fieldLabels()
- public void hasField()
- public void setField()
- public void setCastedField()
- public void getField()
- public void fieldLabel()
- public void singular_name()
- public void i18n_singular_name()
- public void plural_name()
- public void i18n_plural_name()
- public void getDefaultSearchContext()
- public void canCreate()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void extendedCan()
- public void summaryFields()
- public void flushCache()
Hierarchy
Extends
Members
protected
- $_cache_composite_fields
- $_cache_db
- $_cache_field_labels
- $_cache_get_one
- $record
public
- $db
- $db
- $summary_fields
Methods
public
- collection() — Dummy collection WIll be created if it does not exists
- delete()
- delete_by_id()
- get() — Child classes should call $list = parent::get();
- getID() — MongoDB identifiers can be objects Make sure we have a $this->ID to work witch
- get_by_id()
- write()
Inherited from ExternalDataObject
public
- __get()
- __set()
- canCreate()
- canDelete()
- canEdit()
- canView()
- db()
- dbObject()
- extendedCan()
- fieldLabel()
- fieldLabels()
- flushCache()
- get() — Child classes should call $list = parent::get();
- getCMSFields()
- getDefaultSearchContext()
- getField()
- getFrontEndFields()
- getID()
- getTitle()
- hasField()
- i18n_plural_name()
- i18n_singular_name()
- is_composite_field()
- plural_name()
- scaffoldFormFields()
- setCastedField()
- setField()
- singular_name()
- summaryFields()