PHP 7.4.33
Preview: Shape.php Size: 1.78 KB
/home/godevadmin/www/admin/vendor/aws/Aws/Api/Shape.php

<?php
namespace Aws\Api;

/**
 * Base class representing a modeled shape.
 */
class Shape extends AbstractModel
{
    /**
     * Get a concrete shape for the given definition.
     *
     * @param array    $definition
     * @param ShapeMap $shapeMap
     *
     * @return mixed
     * @throws \RuntimeException if the type is invalid
     */
    public static function create(array $definition, ShapeMap $shapeMap)
    {
        static $map = [
            'structure' => 'Aws\Api\StructureShape',
            'map'       => 'Aws\Api\MapShape',
            'list'      => 'Aws\Api\ListShape',
            'timestamp' => 'Aws\Api\TimestampShape',
            'integer'   => 'Aws\Api\Shape',
            'double'    => 'Aws\Api\Shape',
            'float'     => 'Aws\Api\Shape',
            'long'      => 'Aws\Api\Shape',
            'string'    => 'Aws\Api\Shape',
            'byte'      => 'Aws\Api\Shape',
            'character' => 'Aws\Api\Shape',
            'blob'      => 'Aws\Api\Shape',
            'boolean'   => 'Aws\Api\Shape'
        ];

        if (isset($definition['shape'])) {
            return $shapeMap->resolve($definition);
        }

        if (!isset($map[$definition['type']])) {
            throw new \RuntimeException('Invalid type: '
                . print_r($definition, true));
        }

        $type = $map[$definition['type']];

        return new $type($definition, $shapeMap);
    }

    /**
     * Get the type of the shape
     *
     * @return string
     */
    public function getType()
    {
        return $this->definition['type'];
    }

    /**
     * Get the name of the shape
     *
     * @return string
     */
    public function getName()
    {
        return $this->definition['name'];
    }
}

Directory Contents

Dirs: 3 × Files: 13

Name Size Perms Modified Actions
- drwxrwxr-x 2024-06-18 20:09:54
Edit Download
Parser DIR
- drwxrwxr-x 2024-06-18 20:09:54
Edit Download
- drwxrwxr-x 2024-06-18 20:09:56
Edit Download
1.87 KB lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
7.71 KB lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
3.77 KB lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
3.21 KB lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
821 B lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
1.20 KB lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
2.32 KB lrwxrwxr-x 2024-06-18 20:09:52
Edit Download
12.55 KB lrwxrwxr-x 2024-06-18 20:09:54
Edit Download
1.78 KB lrwxrwxr-x 2024-06-18 20:09:54
Edit Download
1.53 KB lrwxrwxr-x 2024-06-18 20:09:54
Edit Download
1.72 KB lrwxrwxr-x 2024-06-18 20:09:54
Edit Download
1.48 KB lrwxrwxr-x 2024-06-18 20:09:54
Edit Download
10.33 KB lrwxrwxr-x 2024-06-18 20:09:54
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).