Zend/Db/TableGatewayの変更点
- 追加された行はこの色です。
- 削除された行はこの色です。
- 移動:バックアップ
- バージョン:(Rev:_6R4JuUhu4)2014-04-09 14:08:33
- 直前のバージョン:(Rev:dOu4l734QH)2014-04-09 14:08:11
Old | New | 差分 | |
---|---|---|---|
6 | 6 | $userRow = $rowset->current(); | |
7 | 7 | var_dump($artistRow); | |
8 | 8 | }} | |
9 | - | ||
9 | + | ||
10 | 10 | *コンストラクタ [#aFHTeyJ] | |
11 | 11 | :引数|string $table | |
12 | 12 | AdapterInterface $adapter | |
13 | 13 | Feature\AbstractFeature|Feature\FeatureSet|Feature\AbstractFeature[] $features | |
14 | 14 | ResultSetInterface $resultSetPrototype | |
15 | 15 | Sql $sql | |
16 | - | ||
16 | + | ||
17 | 17 | #sh(php){$tgw = new TableGateway("table", $adapter, null, $resultSetPrototype);} | |
18 | - | ||
18 | + | ||
19 | 19 | * select [#s0bdKN7] | |
20 | 20 | :引数|Where|\Closure|string|array $where | |
21 | - | ||
21 | + | ||
22 | 22 | [[Zend/Db/Sql>Zend/Db/Sql#8hdU3yM]]クラスを利用される。 | |
23 | 23 | #sh(php){$userTable->select(array("name"=>"yamada"));} | |
24 | 24 | Closureの利用 | |
29 | 29 | $select->order('name ASC')->limit(2); | |
30 | 30 | }); | |
31 | 31 | }} | |
32 | - | ||
32 | + | ||
33 | 33 | * insert [#sm3VrxN] | |
34 | 34 | :引数|array $set | |
35 | - | ||
35 | + | ||
36 | 36 | #sh(php){$userTable->insert(array("name"=>"tanaka", "age"=>"25"));} | |
37 | - | ||
37 | + | ||
38 | 38 | * update [#BeE85Dl] | |
39 | 39 | :引数|array $set | |
40 | 40 | string|array|closure $where | |
41 | 41 | ||
42 | - | #sh(php){$userTable->update(array("name"=>"tanaka"), array("age"=>"30"));} | |
43 | - | ||
42 | + | #sh(php){$userTable->update(array("age"=>"30"), array("name"=>"tanaka"));} | |
44 | 43 | * delete [#HAeAmma] | |
45 | 44 | :引数|Where|\Closure|string|array $where | |
46 | - | ||
45 | + | ||
47 | 46 | #sh(php){$userTable->update(array("name"=>"tanaka"));} |