| @@ 14-63 (lines=50) @@ | ||
| 11 | * |
|
| 12 | * XSD Type: TOnAction |
|
| 13 | */ |
|
| 14 | class TOnActionType extends IsOK |
|
| 15 | { |
|
| 16 | use TActionTrait, GEmptyElementExtensibilityTrait; |
|
| 17 | /** |
|
| 18 | * @property string $action |
|
| 19 | */ |
|
| 20 | private $action = null; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Gets as action |
|
| 24 | * |
|
| 25 | * @return string |
|
| 26 | */ |
|
| 27 | public function getAction() |
|
| 28 | { |
|
| 29 | return $this->action; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Sets a new action |
|
| 34 | * |
|
| 35 | * @param string $action |
|
| 36 | * @return self |
|
| 37 | */ |
|
| 38 | public function setAction($action) |
|
| 39 | { |
|
| 40 | $this->action = $action; |
|
| 41 | return $this; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @param null $msg |
|
| 46 | * @return bool |
|
| 47 | */ |
|
| 48 | public function isOK(&$msg = null) |
|
| 49 | { |
|
| 50 | if (!$this->isStringNotNullOrEmpty($this->action)) { |
|
| 51 | $msg = "Action cannot be null or empty"; |
|
| 52 | return false; |
|
| 53 | } |
|
| 54 | if (!$this->isTActionValid($this->action)) { |
|
| 55 | $msg = "Action must be valid TAction"; |
|
| 56 | return false; |
|
| 57 | } |
|
| 58 | if (!$this->isExtensibilityElementOK($msg)) { |
|
| 59 | return false; |
|
| 60 | } |
|
| 61 | return true; |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| @@ 14-59 (lines=46) @@ | ||
| 11 | * |
|
| 12 | * XSD Type: TPropertyRef |
|
| 13 | */ |
|
| 14 | class TPropertyRefType extends IsOK |
|
| 15 | { |
|
| 16 | use TSimpleIdentifierTrait, GEmptyElementExtensibilityTrait; |
|
| 17 | /** |
|
| 18 | * @property string $name |
|
| 19 | */ |
|
| 20 | private $name = null; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Gets as name |
|
| 24 | * |
|
| 25 | * @return string |
|
| 26 | */ |
|
| 27 | public function getName() |
|
| 28 | { |
|
| 29 | return $this->name; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Sets a new name |
|
| 34 | * |
|
| 35 | * @param string $name |
|
| 36 | * @return self |
|
| 37 | */ |
|
| 38 | public function setName($name) |
|
| 39 | { |
|
| 40 | $this->name = $name; |
|
| 41 | return $this; |
|
| 42 | } |
|
| 43 | ||
| 44 | public function isOK(&$msg = null) |
|
| 45 | { |
|
| 46 | if (!$this->isStringNotNullOrEmpty($this->name)) { |
|
| 47 | $msg = "Name cannot be null or empty"; |
|
| 48 | return false; |
|
| 49 | } |
|
| 50 | if (!$this->isTSimpleIdentifierValid($this->name)) { |
|
| 51 | $msg = "Name must be valid TSimpleIdentifier"; |
|
| 52 | return false; |
|
| 53 | } |
|
| 54 | if (!$this->isExtensibilityElementOK($msg)) { |
|
| 55 | return false; |
|
| 56 | } |
|
| 57 | return true; |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||