File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
lib/internal/Magento/Framework/DataObject Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 167
167
<preference for =" Magento\Framework\EntityManager\MapperInterface" type =" Magento\Framework\EntityManager\CompositeMapper" />
168
168
<preference for =" Magento\Framework\Console\CommandListInterface" type =" Magento\Framework\Console\CommandList" />
169
169
<preference for =" Magento\Framework\DataObject\IdentityGeneratorInterface" type =" Magento\Framework\DataObject\IdentityService" />
170
+ <preference for =" Magento\Framework\DataObject\IdentityValidatorInterface" type =" Magento\Framework\DataObject\IdentityValidator" />
170
171
<preference for =" Magento\Framework\Serialize\SerializerInterface" type =" Magento\Framework\Serialize\Serializer\Json" />
171
172
<preference for =" Magento\Framework\App\Scope\ValidatorInterface" type =" Magento\Framework\App\Scope\Validator" />
172
173
<preference for =" Magento\Framework\App\ScopeResolverInterface" type =" Magento\Framework\App\ScopeResolver" />
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Framework \DataObject ;
7
+
8
+ use Ramsey \Uuid \Uuid ;
9
+
10
+ /**
11
+ * Class IdentityValidator
12
+ */
13
+ class IdentityValidator implements IdentityValidatorInterface
14
+ {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ public function isValid ($ value )
19
+ {
20
+ $ isValid = Uuid::isValid ($ value );
21
+ return $ isValid ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Framework \DataObject ;
7
+
8
+ /**
9
+ * Interface IdentityValidatorInterface
10
+ */
11
+ interface IdentityValidatorInterface
12
+ {
13
+ /**
14
+ * Checks if uuid is valid
15
+ *
16
+ * @param string $value
17
+ *
18
+ * @return string
19
+ */
20
+ public function isValid ($ value );
21
+ }
You can’t perform that action at this time.
0 commit comments