コード例 #1
0
ファイル: midgard.php プロジェクト: nemein/openpsa
 /**
  * Start up the storage manager and bind it to a given MidgardObject.
  * The passed object must be a MidCOM DBA object, otherwise the system bails with
  * midcom_error. In this case, no automatic conversion is done, as this would
  * destroy the reference.
  *
  * @param midcom_helper_datamanager2_schema $schema The data schema to use for processing.
  * @param MidCOMDBAObject $object A reference to the DBA object to user for Data I/O.
  */
 public function __construct($schema, $object)
 {
     parent::__construct($schema);
     if (!midcom::get('dbclassloader')->is_mgdschema_object($object)) {
         debug_print_r('Object passed:', $object);
         throw new midcom_error('The midgard storage backend requires a MidCOM DBA object.');
     }
     $this->object = $object;
 }
コード例 #2
0
ファイル: null.php プロジェクト: nemein/openpsa
 /**
  * TODO
  *
  * @param midcom_helper_datamanager2_schema &$schema The data schema to use for processing.
  * @param Array $defaults The defaults to use as "artificial" storage. This can be omitted
  *     safely.
  */
 public function __construct(&$schema, $defaults = array())
 {
     parent::__construct($schema);
     $this->_defaults = $defaults;
 }