File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/Mapper/ContentType/Validation Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * This file is part of the contentful/contentful-management package.
5+ *
6+ * @copyright 2015-2020 Contentful GmbH
7+ * @license MIT
8+ */
9+
10+ declare (strict_types=1 );
11+
12+ namespace Contentful \Management \Mapper \ContentType \Validation ;
13+
14+ use Contentful \Management \Mapper \BaseMapper ;
15+ use Contentful \Management \Resource \ContentType \Validation \RegexpValidation as ResourceClass ;
16+
17+ /**
18+ RegexpValidation class.
19+ */
20+ class ProhibitRegexpValidation extends BaseMapper
21+ {
22+ /**
23+ {@inheritdoc}
24+ */
25+ public function map ($ resource , array $ data ): ResourceClass
26+ {
27+ return new ResourceClass (
28+ $ data ['prohibitRegexp ' ]['pattern ' ] ?? null ,
29+ $ data ['prohibitRegexp ' ]['flags ' ] ?? null
30+ );
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments