1 | <?php |
||
15 | class TTypeRefType extends IsOK |
||
|
|||
16 | { |
||
17 | use GEmptyElementExtensibilityTrait, TFacetAttributesTrait, TUnwrappedFunctionTypeTrait { |
||
18 | TFacetAttributesTrait::isStringNotNullOrEmpty insteadof GEmptyElementExtensibilityTrait; |
||
19 | TFacetAttributesTrait::isStringNotNull insteadof GEmptyElementExtensibilityTrait; |
||
20 | TFacetAttributesTrait::isNotNullInstanceOf insteadof GEmptyElementExtensibilityTrait; |
||
21 | TFacetAttributesTrait::isNullInstanceOf insteadof GEmptyElementExtensibilityTrait; |
||
22 | TFacetAttributesTrait::isURLValid insteadof GEmptyElementExtensibilityTrait; |
||
23 | TFacetAttributesTrait::isObjectNullOrOK insteadof GEmptyElementExtensibilityTrait; |
||
24 | TFacetAttributesTrait::isObjectNullOrType insteadof GEmptyElementExtensibilityTrait; |
||
25 | TFacetAttributesTrait::isValidArrayOK insteadof GEmptyElementExtensibilityTrait; |
||
26 | TFacetAttributesTrait::isValidArray insteadof GEmptyElementExtensibilityTrait; |
||
27 | TFacetAttributesTrait::isChildArrayOK insteadof GEmptyElementExtensibilityTrait; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @property string $type |
||
32 | */ |
||
33 | private $type = null; |
||
34 | |||
35 | <<<<<<< HEAD |
||
36 | /** |
||
37 | * Gets as type |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | ======= |
||
42 | /** |
||
43 | * Gets as type |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | >>>>>>> Code Cleanup |
||
48 | public function getType() |
||
49 | { |
||
50 | return $this->type; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * Sets a new type |
||
55 | * |
||
56 | * @param string $type |
||
57 | * @return self |
||
58 | */ |
||
59 | public function setType($type) |
||
60 | { |
||
61 | if (!$this->isTUnwrappedFunctionTypeValid($type)) { |
||
62 | $msg = "Type must be a valid TUnwrappedFunctionType"; |
||
63 | throw new \InvalidArgumentException($msg); |
||
64 | } |
||
65 | $this->type = $type; |
||
66 | return $this; |
||
67 | } |
||
68 | |||
69 | public function isOK(&$msg = null) |
||
70 | { |
||
71 | if (!$this->isTUnwrappedFunctionTypeValid($this->type)) { |
||
72 | $msg = "Type must be a valid TUnwrappedFunctionType"; |
||
73 | return false; |
||
74 | } |
||
75 | if (!$this->isExtensibilityElementOK($msg)) { |
||
76 | return false; |
||
84 |