Пример #1
0
 public function __construct(IStorage $adapter)
 {
     $props = array('counter' => array('dataType' => BaseModel::DATATYPE_SINGLE, 'required' => true));
     parent::__construct($adapter, $props, 'referenceCollection');
     $this->set('counter', 0);
     $this->cache = array();
 }
Пример #2
0
 /**
  * @expectedException NedVisol\Orm\InvalidOperationException
  */
 public function testPriviledgedSet_failed()
 {
     $obj = new BaseModel($this->adapter, $this->props);
     $obj->privilegedSet('hiddenfield', 'test');
 }
Пример #3
0
 public function __construct(IStorage $adapter)
 {
     $props = array('field1' => array('dataType' => BaseModel::DATATYPE_SINGLE, 'required' => false), 'field2' => array('dataType' => BaseModel::DATATYPE_SINGLE, 'required' => false), 'refArray' => array('dataType' => BaseModel::DATATYPE_REFARRAY, 'required' => false));
     parent::__construct($adapter, $props, 'testModel2');
 }
Пример #4
0
 public function __construct(IStorage $adapter = null, $propertiesDefinition = array())
 {
     parent::__construct($adapter, $propertiesDefinition);
     $propertiesDefinition = array('username' => array(), 'password' => array());
 }