Exemplo n.º 1
0
 public function addData()
 {
     $data = array_merge(CompositeStoreExample::$product, CompositeStoreExample::$images, CompositeStoreExample::$category, CompositeStoreExample::$categoryProduct);
     foreach ($data as $key => $value) {
         $sql = new MultiInsertSql($this->dbAdapter, $key);
         $tableGateway = new TableGateway($key, $this->dbAdapter, null, null, $sql);
         $dataStore = new DbTable($tableGateway);
         $dataStore->create($value, true);
     }
 }
Exemplo n.º 2
0
 public function addData()
 {
     $data = array_merge(EavExampleStoreCatalog::$sys_entities, EavExampleStoreCatalog::$entity_product, EavExampleStoreCatalog::$entity_category, EavExampleStoreCatalog::$entity_tag, EavExampleStoreCatalog::$entity_mainicon, EavExampleStoreCatalog::$entity_main_specific, EavExampleStoreCatalog::$prop_tag, EavExampleStoreCatalog::$prop_product_category, EavExampleStoreCatalog::$prop_linked_url);
     foreach ($data as $key => $value) {
         $sql = new MultiInsertSql($this->dbAdapter, $key);
         $tableGateway = new TableGateway($key, $this->dbAdapter, null, null, $sql);
         $dataStore = new DbTable($tableGateway);
         echo "create {$key}" . PHP_EOL;
         $dataStore->create($value, true);
     }
 }
Exemplo n.º 3
0
 public function testCreate_withtIdRewriteException()
 {
     $this->_initObject();
     $this->setExpectedException('\\zaboy\\rest\\DataStore\\DataStoreException');
     $this->object->create(array('id' => 2, 'fString' => 'Create_withtIdRewrite'), false);
 }