| @@ 14-119 (lines=106) @@ | ||
| 11 | * |
|
| 12 | * XSD Type: appServiceType |
|
| 13 | */ |
|
| 14 | class AppServiceType extends IsOK |
|
| 15 | { |
|
| 16 | use IsOKToolboxTrait; |
|
| 17 | ||
| 18 | /** |
|
| 19 | * @property \AlgoWeb\ODataMetadata\Atom\Author $author |
|
| 20 | */ |
|
| 21 | private $author = null; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @property \AlgoWeb\ODataMetadata\App\Workspace[] $workspace |
|
| 25 | */ |
|
| 26 | private $workspace = array(); |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Gets as author |
|
| 30 | * |
|
| 31 | * @return \AlgoWeb\ODataMetadata\Atom\Author |
|
| 32 | */ |
|
| 33 | public function getAuthor() |
|
| 34 | { |
|
| 35 | return $this->author; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Sets a new author |
|
| 40 | * |
|
| 41 | * @param \AlgoWeb\ODataMetadata\Atom\Author $author |
|
| 42 | * @return self |
|
| 43 | */ |
|
| 44 | public function setAuthor(\AlgoWeb\ODataMetadata\Atom\Author $author) |
|
| 45 | { |
|
| 46 | $this->author = $author; |
|
| 47 | return $this; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Adds as workspace |
|
| 52 | * |
|
| 53 | * @return self |
|
| 54 | * @param \AlgoWeb\ODataMetadata\App\Workspace $workspace |
|
| 55 | */ |
|
| 56 | public function addToWorkspace(\AlgoWeb\ODataMetadata\App\Workspace $workspace) |
|
| 57 | { |
|
| 58 | $this->workspace[] = $workspace; |
|
| 59 | return $this; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * isset workspace |
|
| 64 | * |
|
| 65 | * @param scalar $index |
|
| 66 | * @return boolean |
|
| 67 | */ |
|
| 68 | public function issetWorkspace($index) |
|
| 69 | { |
|
| 70 | return isset($this->workspace[$index]); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * unset workspace |
|
| 75 | * |
|
| 76 | * @param scalar $index |
|
| 77 | * @return void |
|
| 78 | */ |
|
| 79 | public function unsetWorkspace($index) |
|
| 80 | { |
|
| 81 | unset($this->workspace[$index]); |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * Gets as workspace |
|
| 86 | * |
|
| 87 | * @return \AlgoWeb\ODataMetadata\App\Workspace[] |
|
| 88 | */ |
|
| 89 | public function getWorkspace() |
|
| 90 | { |
|
| 91 | return $this->workspace; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Sets a new workspace |
|
| 96 | * |
|
| 97 | * @param \AlgoWeb\ODataMetadata\App\Workspace[] $workspace |
|
| 98 | * @return self |
|
| 99 | */ |
|
| 100 | public function setWorkspace(array $workspace) |
|
| 101 | { |
|
| 102 | $this->workspace = $workspace; |
|
| 103 | return $this; |
|
| 104 | } |
|
| 105 | ||
| 106 | public function isOK(&$msg = null) |
|
| 107 | { |
|
| 108 | if (!$this->isObjectNullOrType('\AlgoWeb\ODataMetadata\Atom\Author', $this->author, $msg)) { |
|
| 109 | return false; |
|
| 110 | } |
|
| 111 | if ($this->isObjectNullOrOK($this->author, $msg)) { |
|
| 112 | return false; |
|
| 113 | } |
|
| 114 | if ($this->isValidArrayOK($this->workspace, '\AlgoWeb\ODataMetadata\App\Workspace', $msg, 1)) { |
|
| 115 | return false; |
|
| 116 | } |
|
| 117 | return true; |
|
| 118 | } |
|
| 119 | } |
|
| 120 | ||
| @@ 14-121 (lines=108) @@ | ||
| 11 | * |
|
| 12 | * XSD Type: appWorkspaceType |
|
| 13 | */ |
|
| 14 | class AppWorkspaceType extends IsOK |
|
| 15 | { |
|
| 16 | use IsOKToolboxTrait; |
|
| 17 | ||
| 18 | /** |
|
| 19 | * @property \AlgoWeb\ODataMetadata\Atom\Title $title |
|
| 20 | */ |
|
| 21 | private $title = null; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @property \AlgoWeb\ODataMetadata\App\Collection[] $collection |
|
| 25 | */ |
|
| 26 | private $collection = array(); |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Gets as title |
|
| 30 | * |
|
| 31 | * @return \AlgoWeb\ODataMetadata\Atom\Title |
|
| 32 | */ |
|
| 33 | public function getTitle() |
|
| 34 | { |
|
| 35 | return $this->title; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Sets a new title |
|
| 40 | * |
|
| 41 | * @param \AlgoWeb\ODataMetadata\Atom\Title $title |
|
| 42 | * @return self |
|
| 43 | */ |
|
| 44 | public function setTitle(\AlgoWeb\ODataMetadata\Atom\Title $title) |
|
| 45 | { |
|
| 46 | $this->title = $title; |
|
| 47 | return $this; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Adds as collection |
|
| 52 | * |
|
| 53 | * @return self |
|
| 54 | * @param \AlgoWeb\ODataMetadata\App\Collection $collection |
|
| 55 | */ |
|
| 56 | public function addToCollection(\AlgoWeb\ODataMetadata\App\Collection $collection) |
|
| 57 | { |
|
| 58 | $this->collection[] = $collection; |
|
| 59 | return $this; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * isset collection |
|
| 64 | * |
|
| 65 | * @param scalar $index |
|
| 66 | * @return boolean |
|
| 67 | */ |
|
| 68 | public function issetCollection($index) |
|
| 69 | { |
|
| 70 | return isset($this->collection[$index]); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * unset collection |
|
| 75 | * |
|
| 76 | * @param scalar $index |
|
| 77 | * @return void |
|
| 78 | */ |
|
| 79 | public function unsetCollection($index) |
|
| 80 | { |
|
| 81 | unset($this->collection[$index]); |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * Gets as collection |
|
| 86 | * |
|
| 87 | * @return \AlgoWeb\ODataMetadata\App\Collection[] |
|
| 88 | */ |
|
| 89 | public function getCollection() |
|
| 90 | { |
|
| 91 | return $this->collection; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Sets a new collection |
|
| 96 | * |
|
| 97 | * @param \AlgoWeb\ODataMetadata\App\Collection[] $collection |
|
| 98 | * @return self |
|
| 99 | */ |
|
| 100 | public function setCollection(array $collection) |
|
| 101 | { |
|
| 102 | $this->collection = $collection; |
|
| 103 | return $this; |
|
| 104 | } |
|
| 105 | ||
| 106 | public function isOK(&$msg = null) |
|
| 107 | { |
|
| 108 | if ($this->isNotNullInstanceOf($this->title, '\AlgoWeb\ODataMetadata\Atom\Title')) { |
|
| 109 | $msg = "AppWorkspace Type Must not be null and it must be set to an instance of Atom Title."; |
|
| 110 | return false; |
|
| 111 | } |
|
| 112 | ||
| 113 | if (!$this->title->IsOk($msg)) { |
|
| 114 | return false; |
|
| 115 | } |
|
| 116 | if (!$this->isValidArrayOK($this->collection, '\AlgoWeb\ODataMetadata\App\Collection', $msg)) { |
|
| 117 | return false; |
|
| 118 | } |
|
| 119 | return true; |
|
| 120 | } |
|
| 121 | } |
|
| 122 | ||