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(); }
/** * @expectedException NedVisol\Orm\InvalidOperationException */ public function testPriviledgedSet_failed() { $obj = new BaseModel($this->adapter, $this->props); $obj->privilegedSet('hiddenfield', 'test'); }
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'); }
public function __construct(IStorage $adapter = null, $propertiesDefinition = array()) { parent::__construct($adapter, $propertiesDefinition); $propertiesDefinition = array('username' => array(), 'password' => array()); }