-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,656 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/* | ||
* PSX is an open source PHP framework to develop RESTful APIs. | ||
* For the current version and information visit <https://phpsx.org> | ||
* | ||
* Copyright 2010-2024 Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace PSX\Api\Generator\Server\Dto; | ||
|
||
/** | ||
* @author Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 | ||
* @link https://phpsx.org | ||
* @extends \ArrayObject<string, mixed> | ||
*/ | ||
class Context extends \ArrayObject | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/* | ||
* PSX is an open source PHP framework to develop RESTful APIs. | ||
* For the current version and information visit <https://phpsx.org> | ||
* | ||
* Copyright 2010-2024 Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace PSX\Api\Generator\Server\Dto; | ||
|
||
use PSX\Api\OperationInterface; | ||
|
||
/** | ||
* @author Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 | ||
* @link https://phpsx.org | ||
*/ | ||
class File | ||
{ | ||
private string $name; | ||
private array $operations; | ||
|
||
public function __construct(string $name) | ||
{ | ||
$this->name = $name; | ||
$this->operations = []; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* @return array<string, OperationInterface> | ||
*/ | ||
public function getOperations(): array | ||
{ | ||
return $this->operations; | ||
} | ||
|
||
public function addOperation(string $name, OperationInterface $operation): void | ||
{ | ||
$this->operations[$name] = $operation; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
/* | ||
* PSX is an open source PHP framework to develop RESTful APIs. | ||
* For the current version and information visit <https://phpsx.org> | ||
* | ||
* Copyright 2010-2024 Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace PSX\Api\Generator\Server\Dto; | ||
|
||
/** | ||
* @author Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 | ||
* @link https://phpsx.org | ||
*/ | ||
class Folder | ||
{ | ||
private array $folders; | ||
private array $files; | ||
|
||
public function __construct() | ||
{ | ||
$this->folders = []; | ||
$this->files = []; | ||
} | ||
|
||
/** | ||
* @return array<string, Folder> | ||
*/ | ||
public function getFolders(): array | ||
{ | ||
return $this->folders; | ||
} | ||
|
||
public function hasFolders(): bool | ||
{ | ||
return count($this->folders) > 0; | ||
} | ||
|
||
public function addFolder(string $name, Folder $folder): void | ||
{ | ||
$this->folders[$name] = $folder; | ||
} | ||
|
||
public function getFolder(string $name): ?Folder | ||
{ | ||
return $this->folders[$name] ?? null; | ||
} | ||
|
||
/** | ||
* @return array<string, File> | ||
*/ | ||
public function getFiles(): array | ||
{ | ||
return $this->files; | ||
} | ||
|
||
public function addFile(string $name, File $file): void | ||
{ | ||
$this->files[$name] = $file; | ||
} | ||
|
||
public function getFile(string $name): ?File | ||
{ | ||
return $this->files[$name] ?? null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/* | ||
* PSX is an open source PHP framework to develop RESTful APIs. | ||
* For the current version and information visit <https://phpsx.org> | ||
* | ||
* Copyright 2010-2023 Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace PSX\Api\Generator\Server\Dto; | ||
|
||
/** | ||
* Type | ||
* | ||
* @author Christoph Kappestein <christoph.kappestein@gmail.com> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 | ||
* @link https://phpsx.org | ||
*/ | ||
class Type | ||
{ | ||
public function __construct( | ||
public string $type, | ||
public string $docType, | ||
public bool $isMap = false, | ||
public bool $isArray = false, | ||
) | ||
{ | ||
} | ||
} |
Oops, something went wrong.