REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 3.21 KB
Close
/home/godevadmin/www/admin/vendor/aws/Aws/Api/DocModel.php
Text
Base64
<?php namespace Aws\Api; /** * Encapsulates the documentation strings for a given service-version and * provides methods for extracting the desired parts related to a service, * operation, error, or shape (i.e., parameter). */ class DocModel { /** @var array */ private $docs; /** * @param array $docs * * @throws \RuntimeException */ public function __construct(array $docs) { if (!extension_loaded('tidy')) { throw new \RuntimeException('The "tidy" PHP extension is required.'); } $this->docs = $docs; } /** * Convert the doc model to an array. * * @return array */ public function toArray() { return $this->docs; } /** * Retrieves documentation about the service. * * @return null|string */ public function getServiceDocs() { return isset($this->docs['service']) ? $this->docs['service'] : null; } /** * Retrieves documentation about an operation. * * @param string $operation Name of the operation * * @return null|string */ public function getOperationDocs($operation) { return isset($this->docs['operations'][$operation]) ? $this->docs['operations'][$operation] : null; } /** * Retrieves documentation about an error. * * @param string $error Name of the error * * @return null|string */ public function getErrorDocs($error) { return isset($this->docs['shapes'][$error]['base']) ? $this->docs['shapes'][$error]['base'] : null; } /** * Retrieves documentation about a shape, specific to the context. * * @param string $shapeName Name of the shape. * @param string $parentName Name of the parent/context shape. * @param string $ref Name used by the context to reference the shape. * * @return null|string */ public function getShapeDocs($shapeName, $parentName, $ref) { if (!isset($this->docs['shapes'][$shapeName])) { return ''; } $result = ''; $d = $this->docs['shapes'][$shapeName]; if (isset($d['refs']["{$parentName}\$${ref}"])) { $result = $d['refs']["{$parentName}\$${ref}"]; } elseif (isset($d['base'])) { $result = $d['base']; } if (isset($d['append'])) { $result .= $d['append']; } return $this->clean($result); } private function clean($content) { if (!$content) { return ''; } $tidy = new \tidy(); $tidy->parseString($content, [ 'indent' => true, 'doctype' => 'omit', 'output-html' => true, 'show-body-only' => true, 'drop-empty-paras' => true, 'drop-font-tags' => true, 'drop-proprietary-attributes' => true, 'hide-comments' => true, 'logical-emphasis' => true ]); $tidy->cleanRepair(); return (string) $content; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ErrorParser
DIR
-
drwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Parser
DIR
-
drwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Serializer
DIR
-
drwxrwxr-x
2024-06-18 20:09:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractModel.php
1.87 KB
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ApiProvider.php
7.71 KB
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DateTimeResult.php
3.77 KB
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DocModel.php
3.21 KB
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ListShape.php
821 B
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MapShape.php
1.20 KB
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Operation.php
2.32 KB
lrwxrwxr-x
2024-06-18 20:09:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Service.php
12.55 KB
lrwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Shape.php
1.78 KB
lrwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ShapeMap.php
1.53 KB
lrwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StructureShape.php
1.72 KB
lrwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TimestampShape.php
1.48 KB
lrwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Validator.php
10.33 KB
lrwxrwxr-x
2024-06-18 20:09:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).