@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @param string $domain Name of the domain (e.g. media, text, etc.) |
51 | 51 | * @param \Aimeos\MShop\Common\Item\Lists\Iface $listItem List item referencing the new domain item |
52 | 52 | * @param \Aimeos\MShop\Common\Item\Iface|null $refItem New item added to the given domain or null if no item should be referenced |
53 | - * @return \Aimeos\MShop\Common\Item\ListRef\Iface Self object for method chaining |
|
53 | + * @return Base Self object for method chaining |
|
54 | 54 | */ |
55 | 55 | public function addRefItem( $domain, \Aimeos\MShop\Common\Item\Lists\Iface $listItem, \Aimeos\MShop\Common\Item\Iface $refItem = null ) |
56 | 56 | { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @param string $domain Name of the domain (e.g. media, text, etc.) |
76 | 76 | * @param \Aimeos\MShop\Common\Item\Lists\Iface $listItem List item referencing the domain item |
77 | 77 | * @param \Aimeos\MShop\Common\Item\Iface|null $refItem Existing item removed from the given domain or null if item shouldn't be removed |
78 | - * @return \Aimeos\MShop\Common\Item\ListRef\Iface Self object for method chaining |
|
78 | + * @return Base Self object for method chaining |
|
79 | 79 | * @throws \Aimeos\MShop\Exception If given list item isn't found |
80 | 80 | */ |
81 | 81 | public function deleteRefItem( $domain, \Aimeos\MShop\Common\Item\Lists\Iface $listItem, \Aimeos\MShop\Common\Item\Iface $refItem = null ) |
@@ -192,9 +192,9 @@ discard block |
||
192 | 192 | * to the requested domain to get the items. Otherwise, no items will be |
193 | 193 | * returned by this method. |
194 | 194 | * |
195 | - * @param array|string|null $domain Name/Names of the domain (e.g. product, text, etc.) or null for all |
|
195 | + * @param string $domain Name/Names of the domain (e.g. product, text, etc.) or null for all |
|
196 | 196 | * @param array|string|null $type Name/Names of the item type or null for all |
197 | - * @param array|string|null $listtype Name/Names of the list item type or null for all |
|
197 | + * @param string $listtype Name/Names of the list item type or null for all |
|
198 | 198 | * @param boolean $active True to return only active items, false to return all |
199 | 199 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
200 | 200 | */ |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | public function testGetItem() |
54 | 54 | { |
55 | 55 | $search = $this->object->createSearch(); |
56 | - $search->setConditions( $search->compare( '==', 'supplier.lists.type.editor', $this->editor) ); |
|
57 | - $results = $this->object->searchItems($search); |
|
56 | + $search->setConditions( $search->compare( '==', 'supplier.lists.type.editor', $this->editor ) ); |
|
57 | + $results = $this->object->searchItems( $search ); |
|
58 | 58 | |
59 | - if( ( $expected = reset($results) ) === false ) { |
|
59 | + if( ( $expected = reset( $results ) ) === false ) { |
|
60 | 60 | throw new \RuntimeException( 'No attribute list type item found' ); |
61 | 61 | } |
62 | 62 | |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | public function testSaveUpdateDeleteItem() |
75 | 75 | { |
76 | 76 | $search = $this->object->createSearch(); |
77 | - $search->setConditions( $search->compare( '==', 'supplier.lists.type.editor', $this->editor) ); |
|
78 | - $results = $this->object->searchItems($search); |
|
77 | + $search->setConditions( $search->compare( '==', 'supplier.lists.type.editor', $this->editor ) ); |
|
78 | + $results = $this->object->searchItems( $search ); |
|
79 | 79 | |
80 | - if( ( $item = reset($results) ) === false ) { |
|
80 | + if( ( $item = reset( $results ) ) === false ) { |
|
81 | 81 | throw new \RuntimeException( 'No type item found' ); |
82 | 82 | } |
83 | 83 | |
84 | - $item->setId(null); |
|
84 | + $item->setId( null ); |
|
85 | 85 | $item->setCode( 'unitTestSave' ); |
86 | 86 | $resultSaved = $this->object->saveItem( $item ); |
87 | 87 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -141,14 +141,14 @@ discard block |
||
141 | 141 | $expr[] = $search->compare( '>=', 'supplier.lists.type.ctime', '1970-01-01 00:00:00' ); |
142 | 142 | $expr[] = $search->compare( '==', 'supplier.lists.type.editor', $this->editor ); |
143 | 143 | |
144 | - $search->setConditions( $search->combine('&&', $expr) ); |
|
144 | + $search->setConditions( $search->combine( '&&', $expr ) ); |
|
145 | 145 | $search->setSortations( [$search->sort( '-', 'supplier.lists.type.position' )] ); |
146 | - $search->setSlice(0, 1); |
|
146 | + $search->setSlice( 0, 1 ); |
|
147 | 147 | $results = $this->object->searchItems( $search, [], $total ); |
148 | 148 | $this->assertEquals( 1, count( $results ) ); |
149 | 149 | $this->assertEquals( 1, $total ); |
150 | 150 | |
151 | - foreach($results as $itemId => $item) { |
|
151 | + foreach( $results as $itemId => $item ) { |
|
152 | 152 | $this->assertEquals( $itemId, $item->getId() ); |
153 | 153 | } |
154 | 154 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | public function testGetSubManager() |
158 | 158 | { |
159 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
160 | - $this->object->getSubManager('unknown'); |
|
159 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
160 | + $this->object->getSubManager( 'unknown' ); |
|
161 | 161 | } |
162 | 162 | } |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | { |
20 | 20 | $this->editor = \TestHelperMShop::getContext()->getEditor(); |
21 | 21 | $manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperMShop::getContext() ); |
22 | - $this->object = $manager->getSubManager( 'property' )->getSubManager('type'); |
|
22 | + $this->object = $manager->getSubManager( 'property' )->getSubManager( 'type' ); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | protected function tearDown() |
27 | 27 | { |
28 | - unset($this->object); |
|
28 | + unset( $this->object ); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $results = $this->object->searchItems( $search ); |
70 | 70 | |
71 | - if( ($expected = reset($results) ) === false ) |
|
71 | + if( ( $expected = reset( $results ) ) === false ) |
|
72 | 72 | { |
73 | 73 | throw new \RuntimeException( 'No property type item found.' ); |
74 | 74 | } |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | { |
91 | 91 | $search = $this->object->createSearch(); |
92 | 92 | $search->setConditions( $search->compare( '==', 'product.property.type.editor', $this->editor ) ); |
93 | - $results = $this->object->searchItems($search); |
|
93 | + $results = $this->object->searchItems( $search ); |
|
94 | 94 | |
95 | - if( ( $item = reset($results) ) === false ) { |
|
95 | + if( ( $item = reset( $results ) ) === false ) { |
|
96 | 96 | throw new \RuntimeException( 'No type item found' ); |
97 | 97 | } |
98 | 98 | |
99 | - $item->setId(null); |
|
99 | + $item->setId( null ); |
|
100 | 100 | $item->setCode( 'unitTestSave' ); |
101 | 101 | $resultSaved = $this->object->saveItem( $item ); |
102 | 102 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -157,25 +157,25 @@ discard block |
||
157 | 157 | $expr[] = $search->compare( '>=', 'product.property.type.ctime', '1970-01-01 00:00:00' ); |
158 | 158 | $expr[] = $search->compare( '==', 'product.property.type.editor', $this->editor ); |
159 | 159 | |
160 | - $search->setConditions( $search->combine('&&', $expr) ); |
|
160 | + $search->setConditions( $search->combine( '&&', $expr ) ); |
|
161 | 161 | $results = $this->object->searchItems( $search, [], $total ); |
162 | 162 | $this->assertEquals( 1, count( $results ) ); |
163 | 163 | |
164 | 164 | |
165 | 165 | $search = $this->object->createSearch(); |
166 | 166 | $conditions = array( |
167 | - $search->compare( '=~', 'product.property.type.code', 'package-'), |
|
167 | + $search->compare( '=~', 'product.property.type.code', 'package-' ), |
|
168 | 168 | $search->compare( '==', 'product.property.type.editor', $this->editor ) |
169 | 169 | ); |
170 | - $search->setConditions( $search->combine('&&', $conditions ) ); |
|
170 | + $search->setConditions( $search->combine( '&&', $conditions ) ); |
|
171 | 171 | $search->setSortations( [$search->sort( '-', 'product.property.type.position' )] ); |
172 | - $search->setSlice(0, 1); |
|
173 | - $items = $this->object->searchItems( $search, [], $total); |
|
172 | + $search->setSlice( 0, 1 ); |
|
173 | + $items = $this->object->searchItems( $search, [], $total ); |
|
174 | 174 | |
175 | 175 | $this->assertEquals( 1, count( $items ) ); |
176 | 176 | $this->assertEquals( 4, $total ); |
177 | 177 | |
178 | - foreach($items as $itemId => $item) { |
|
178 | + foreach( $items as $itemId => $item ) { |
|
179 | 179 | $this->assertEquals( $itemId, $item->getId() ); |
180 | 180 | } |
181 | 181 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | public function testGetSubManager() |
185 | 185 | { |
186 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
187 | - $this->object->getSubManager('unknown'); |
|
186 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
187 | + $this->object->getSubManager( 'unknown' ); |
|
188 | 188 | } |
189 | 189 | } |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | { |
20 | 20 | $this->editor = \TestHelperMShop::getContext()->getEditor(); |
21 | 21 | $manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( \TestHelperMShop::getContext() ); |
22 | - $this->object = $manager->getSubManager( 'property' )->getSubManager('type'); |
|
22 | + $this->object = $manager->getSubManager( 'property' )->getSubManager( 'type' ); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | protected function tearDown() |
27 | 27 | { |
28 | - unset($this->object); |
|
28 | + unset( $this->object ); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $results = $this->object->searchItems( $search ); |
70 | 70 | |
71 | - if( ($expected = reset($results) ) === false ) |
|
71 | + if( ( $expected = reset( $results ) ) === false ) |
|
72 | 72 | { |
73 | 73 | throw new \RuntimeException( 'No property type item found.' ); |
74 | 74 | } |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | { |
91 | 91 | $search = $this->object->createSearch(); |
92 | 92 | $search->setConditions( $search->compare( '==', 'customer.property.type.editor', $this->editor ) ); |
93 | - $results = $this->object->searchItems($search); |
|
93 | + $results = $this->object->searchItems( $search ); |
|
94 | 94 | |
95 | - if( ( $item = reset($results) ) === false ) { |
|
95 | + if( ( $item = reset( $results ) ) === false ) { |
|
96 | 96 | throw new \RuntimeException( 'No type item found' ); |
97 | 97 | } |
98 | 98 | |
99 | - $item->setId(null); |
|
99 | + $item->setId( null ); |
|
100 | 100 | $item->setCode( 'unitTestSave' ); |
101 | 101 | $resultSaved = $this->object->saveItem( $item ); |
102 | 102 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -157,25 +157,25 @@ discard block |
||
157 | 157 | $expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' ); |
158 | 158 | $expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor ); |
159 | 159 | |
160 | - $search->setConditions( $search->combine('&&', $expr) ); |
|
160 | + $search->setConditions( $search->combine( '&&', $expr ) ); |
|
161 | 161 | $results = $this->object->searchItems( $search, [], $total ); |
162 | 162 | $this->assertEquals( 1, count( $results ) ); |
163 | 163 | |
164 | 164 | |
165 | 165 | $search = $this->object->createSearch(); |
166 | 166 | $conditions = array( |
167 | - $search->compare( '=~', 'customer.property.type.code', 'newsletter'), |
|
167 | + $search->compare( '=~', 'customer.property.type.code', 'newsletter' ), |
|
168 | 168 | $search->compare( '==', 'customer.property.type.editor', $this->editor ) |
169 | 169 | ); |
170 | - $search->setConditions( $search->combine('&&', $conditions ) ); |
|
170 | + $search->setConditions( $search->combine( '&&', $conditions ) ); |
|
171 | 171 | $search->setSortations( [$search->sort( '-', 'customer.property.type.position' )] ); |
172 | - $search->setSlice(0, 1); |
|
173 | - $items = $this->object->searchItems( $search, [], $total); |
|
172 | + $search->setSlice( 0, 1 ); |
|
173 | + $items = $this->object->searchItems( $search, [], $total ); |
|
174 | 174 | |
175 | 175 | $this->assertEquals( 1, count( $items ) ); |
176 | 176 | $this->assertEquals( 1, $total ); |
177 | 177 | |
178 | - foreach($items as $itemId => $item) { |
|
178 | + foreach( $items as $itemId => $item ) { |
|
179 | 179 | $this->assertEquals( $itemId, $item->getId() ); |
180 | 180 | } |
181 | 181 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | public function testGetSubManager() |
185 | 185 | { |
186 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
187 | - $this->object->getSubManager('unknown'); |
|
186 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
187 | + $this->object->getSubManager( 'unknown' ); |
|
188 | 188 | } |
189 | 189 | } |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | { |
20 | 20 | $this->editor = \TestHelperMShop::getContext()->getEditor(); |
21 | 21 | $manager = \Aimeos\MShop\Attribute\Manager\Factory::createManager( \TestHelperMShop::getContext() ); |
22 | - $this->object = $manager->getSubManager( 'property' )->getSubManager('type'); |
|
22 | + $this->object = $manager->getSubManager( 'property' )->getSubManager( 'type' ); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | protected function tearDown() |
27 | 27 | { |
28 | - unset($this->object); |
|
28 | + unset( $this->object ); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $results = $this->object->searchItems( $search ); |
70 | 70 | |
71 | - if( ($expected = reset($results) ) === false ) |
|
71 | + if( ( $expected = reset( $results ) ) === false ) |
|
72 | 72 | { |
73 | 73 | throw new \RuntimeException( 'No property type item found.' ); |
74 | 74 | } |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | { |
91 | 91 | $search = $this->object->createSearch(); |
92 | 92 | $search->setConditions( $search->compare( '==', 'attribute.property.type.editor', $this->editor ) ); |
93 | - $results = $this->object->searchItems($search); |
|
93 | + $results = $this->object->searchItems( $search ); |
|
94 | 94 | |
95 | - if( ( $item = reset($results) ) === false ) { |
|
95 | + if( ( $item = reset( $results ) ) === false ) { |
|
96 | 96 | throw new \RuntimeException( 'No type item found' ); |
97 | 97 | } |
98 | 98 | |
99 | - $item->setId(null); |
|
99 | + $item->setId( null ); |
|
100 | 100 | $item->setCode( 'unitTestSave' ); |
101 | 101 | $resultSaved = $this->object->saveItem( $item ); |
102 | 102 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $search->setConditions( $search->combine( '&&', $conditions ) ); |
174 | 174 | $search->setSortations( [$search->sort( '-', 'attribute.property.type.position' )] ); |
175 | 175 | $search->setSlice( 0, 2 ); |
176 | - $items = $this->object->searchItems( $search, [], $total); |
|
176 | + $items = $this->object->searchItems( $search, [], $total ); |
|
177 | 177 | |
178 | 178 | $this->assertEquals( 2, count( $items ) ); |
179 | 179 | $this->assertEquals( 3, $total ); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | public function testGetSubManager() |
191 | 191 | { |
192 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
193 | - $this->object->getSubManager('unknown'); |
|
192 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
193 | + $this->object->getSubManager( 'unknown' ); |
|
194 | 194 | } |
195 | 195 | } |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | { |
20 | 20 | $this->editor = \TestHelperMShop::getContext()->getEditor(); |
21 | 21 | $manager = \Aimeos\MShop\Media\Manager\Factory::createManager( \TestHelperMShop::getContext() ); |
22 | - $this->object = $manager->getSubManager( 'property' )->getSubManager('type'); |
|
22 | + $this->object = $manager->getSubManager( 'property' )->getSubManager( 'type' ); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | protected function tearDown() |
27 | 27 | { |
28 | - unset($this->object); |
|
28 | + unset( $this->object ); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $results = $this->object->searchItems( $search ); |
70 | 70 | |
71 | - if( ($expected = reset($results) ) === false ) |
|
71 | + if( ( $expected = reset( $results ) ) === false ) |
|
72 | 72 | { |
73 | 73 | throw new \RuntimeException( 'No property type item found.' ); |
74 | 74 | } |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | { |
91 | 91 | $search = $this->object->createSearch(); |
92 | 92 | $search->setConditions( $search->compare( '==', 'media.property.type.editor', $this->editor ) ); |
93 | - $results = $this->object->searchItems($search); |
|
93 | + $results = $this->object->searchItems( $search ); |
|
94 | 94 | |
95 | - if( ( $item = reset($results) ) === false ) { |
|
95 | + if( ( $item = reset( $results ) ) === false ) { |
|
96 | 96 | throw new \RuntimeException( 'No type item found' ); |
97 | 97 | } |
98 | 98 | |
99 | - $item->setId(null); |
|
99 | + $item->setId( null ); |
|
100 | 100 | $item->setCode( 'unitTestSave' ); |
101 | 101 | $resultSaved = $this->object->saveItem( $item ); |
102 | 102 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $expr[] = $search->compare( '>=', 'media.property.type.ctime', '1970-01-01 00:00:00' ); |
158 | 158 | $expr[] = $search->compare( '==', 'media.property.type.editor', $this->editor ); |
159 | 159 | |
160 | - $search->setConditions( $search->combine('&&', $expr) ); |
|
160 | + $search->setConditions( $search->combine( '&&', $expr ) ); |
|
161 | 161 | $results = $this->object->searchItems( $search, [], $total ); |
162 | 162 | $this->assertEquals( 1, count( $results ) ); |
163 | 163 | |
@@ -167,15 +167,15 @@ discard block |
||
167 | 167 | $search->compare( '=~', 'media.property.type.code', '' ), |
168 | 168 | $search->compare( '==', 'media.property.type.editor', $this->editor ) |
169 | 169 | ); |
170 | - $search->setConditions( $search->combine('&&', $conditions ) ); |
|
170 | + $search->setConditions( $search->combine( '&&', $conditions ) ); |
|
171 | 171 | $search->setSortations( [$search->sort( '-', 'media.property.type.position' )] ); |
172 | - $search->setSlice(0, 1); |
|
173 | - $items = $this->object->searchItems( $search, [], $total); |
|
172 | + $search->setSlice( 0, 1 ); |
|
173 | + $items = $this->object->searchItems( $search, [], $total ); |
|
174 | 174 | |
175 | 175 | $this->assertEquals( 1, count( $items ) ); |
176 | 176 | $this->assertEquals( 3, $total ); |
177 | 177 | |
178 | - foreach($items as $itemId => $item) { |
|
178 | + foreach( $items as $itemId => $item ) { |
|
179 | 179 | $this->assertEquals( $itemId, $item->getId() ); |
180 | 180 | } |
181 | 181 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | public function testGetSubManager() |
185 | 185 | { |
186 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
187 | - $this->object->getSubManager('unknown'); |
|
186 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
187 | + $this->object->getSubManager( 'unknown' ); |
|
188 | 188 | } |
189 | 189 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017 |
6 | 6 | */ |
7 | 7 | |
8 | -return array ( |
|
8 | +return array( |
|
9 | 9 | 'attribute/property/type' => array( |
10 | 10 | 'attribute/property/type/size' => array( 'domain' => 'attribute', 'code' => 'size', 'label' => 'Size', 'position' => 0, 'status' => 1 ), |
11 | 11 | 'attribute/property/type/mtime' => array( 'domain' => 'attribute', 'code' => 'mtime', 'label' => 'Modification time', 'position' => 1, 'status' => 1 ), |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function getCode() |
50 | 50 | { |
51 | - if( isset( $this->values[$this->prefix . 'code'] ) ) { |
|
52 | - return (string) $this->values[$this->prefix . 'code']; |
|
51 | + if( isset( $this->values[$this->prefix.'code'] ) ) { |
|
52 | + return (string) $this->values[$this->prefix.'code']; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | return ''; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | if( (string) $code !== $this->getCode() ) |
68 | 68 | { |
69 | - $this->values[$this->prefix . 'code'] = $this->checkCode( $code ); |
|
69 | + $this->values[$this->prefix.'code'] = $this->checkCode( $code ); |
|
70 | 70 | $this->setModified(); |
71 | 71 | } |
72 | 72 | |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function getDomain() |
83 | 83 | { |
84 | - if( isset( $this->values[$this->prefix . 'domain'] ) ) { |
|
85 | - return (string) $this->values[$this->prefix . 'domain']; |
|
84 | + if( isset( $this->values[$this->prefix.'domain'] ) ) { |
|
85 | + return (string) $this->values[$this->prefix.'domain']; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | return ''; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | if( (string) $domain !== $this->getDomain() ) |
101 | 101 | { |
102 | - $this->values[$this->prefix . 'domain'] = (string) $domain; |
|
102 | + $this->values[$this->prefix.'domain'] = (string) $domain; |
|
103 | 103 | $this->setModified(); |
104 | 104 | } |
105 | 105 | |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function getName() |
116 | 116 | { |
117 | - if( isset( $this->values[$this->prefix . 'name'] ) ) { |
|
118 | - return (string) $this->values[$this->prefix . 'name']; |
|
117 | + if( isset( $this->values[$this->prefix.'name'] ) ) { |
|
118 | + return (string) $this->values[$this->prefix.'name']; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | return $this->getLabel(); |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function getLabel() |
131 | 131 | { |
132 | - if( isset( $this->values[$this->prefix . 'label'] ) ) { |
|
133 | - return (string) $this->values[$this->prefix . 'label']; |
|
132 | + if( isset( $this->values[$this->prefix.'label'] ) ) { |
|
133 | + return (string) $this->values[$this->prefix.'label']; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | return ''; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | { |
148 | 148 | if( (string) $label !== $this->getLabel() ) |
149 | 149 | { |
150 | - $this->values[$this->prefix . 'label'] = (string) $label; |
|
150 | + $this->values[$this->prefix.'label'] = (string) $label; |
|
151 | 151 | $this->setModified(); |
152 | 152 | } |
153 | 153 | |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function getPosition() |
163 | 163 | { |
164 | - if( isset( $this->values[$this->prefix . 'position'] ) ) { |
|
165 | - return (int) $this->values[$this->prefix . 'position']; |
|
164 | + if( isset( $this->values[$this->prefix.'position'] ) ) { |
|
165 | + return (int) $this->values[$this->prefix.'position']; |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | return 0; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | if( (int) $pos !== $this->getPosition() ) |
181 | 181 | { |
182 | - $this->values[$this->prefix . 'position'] = (int) $pos; |
|
182 | + $this->values[$this->prefix.'position'] = (int) $pos; |
|
183 | 183 | $this->setModified(); |
184 | 184 | } |
185 | 185 | |
@@ -194,8 +194,8 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function getStatus() |
196 | 196 | { |
197 | - if( isset( $this->values[$this->prefix . 'status'] ) ) { |
|
198 | - return (int) $this->values[$this->prefix . 'status']; |
|
197 | + if( isset( $this->values[$this->prefix.'status'] ) ) { |
|
198 | + return (int) $this->values[$this->prefix.'status']; |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return 0; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | { |
213 | 213 | if( (int) $status !== $this->getStatus() ) |
214 | 214 | { |
215 | - $this->values[$this->prefix . 'status'] = (int) $status; |
|
215 | + $this->values[$this->prefix.'status'] = (int) $status; |
|
216 | 216 | $this->setModified(); |
217 | 217 | } |
218 | 218 | |
@@ -252,17 +252,17 @@ discard block |
||
252 | 252 | { |
253 | 253 | $unknown = []; |
254 | 254 | $list = parent::fromArray( $list ); |
255 | - unset( $list[$this->prefix . 'name'] ); |
|
255 | + unset( $list[$this->prefix.'name'] ); |
|
256 | 256 | |
257 | 257 | foreach( $list as $key => $value ) |
258 | 258 | { |
259 | 259 | switch( $key ) |
260 | 260 | { |
261 | - case $this->prefix . 'code': $this->setCode( $value ); break; |
|
262 | - case $this->prefix . 'domain': $this->setDomain( $value ); break; |
|
263 | - case $this->prefix . 'label': $this->setLabel( $value ); break; |
|
264 | - case $this->prefix . 'position': $this->setPosition( $value ); break; |
|
265 | - case $this->prefix . 'status': $this->setStatus( $value ); break; |
|
261 | + case $this->prefix.'code': $this->setCode( $value ); break; |
|
262 | + case $this->prefix.'domain': $this->setDomain( $value ); break; |
|
263 | + case $this->prefix.'label': $this->setLabel( $value ); break; |
|
264 | + case $this->prefix.'position': $this->setPosition( $value ); break; |
|
265 | + case $this->prefix.'status': $this->setStatus( $value ); break; |
|
266 | 266 | default: $unknown[$key] = $value; |
267 | 267 | } |
268 | 268 | } |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | { |
282 | 282 | $list = parent::toArray( $private ); |
283 | 283 | |
284 | - $list[$this->prefix . 'code'] = $this->getCode(); |
|
285 | - $list[$this->prefix . 'domain'] = $this->getDomain(); |
|
286 | - $list[$this->prefix . 'name'] = $this->getName(); |
|
287 | - $list[$this->prefix . 'label'] = $this->getLabel(); |
|
288 | - $list[$this->prefix . 'position'] = $this->getPosition(); |
|
289 | - $list[$this->prefix . 'status'] = $this->getStatus(); |
|
284 | + $list[$this->prefix.'code'] = $this->getCode(); |
|
285 | + $list[$this->prefix.'domain'] = $this->getDomain(); |
|
286 | + $list[$this->prefix.'name'] = $this->getName(); |
|
287 | + $list[$this->prefix.'label'] = $this->getLabel(); |
|
288 | + $list[$this->prefix.'position'] = $this->getPosition(); |
|
289 | + $list[$this->prefix.'status'] = $this->getStatus(); |
|
290 | 290 | |
291 | 291 | return $list; |
292 | 292 | } |