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

<?php
namespace Aws\Api;

/**
 * Base class that is used by most API shapes
 */
abstract class AbstractModel implements \ArrayAccess
{
    /** @var array */
    protected $definition;

    /** @var ShapeMap */
    protected $shapeMap;

    /**
     * @param array    $definition Service description
     * @param ShapeMap $shapeMap   Shapemap used for creating shapes
     */
    public function __construct(array $definition, ShapeMap $shapeMap)
    {
        $this->definition = $definition;
        $this->shapeMap = $shapeMap;
    }

    public function toArray()
    {
        return $this->definition;
    }

    /**
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->definition[$offset])
            ? $this->definition[$offset] : null;
    }

    /**
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        $this->definition[$offset] = $value;
    }

    /**
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->definition[$offset]);
    }

    /**
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->definition[$offset]);
    }

    protected function shapeAt($key)
    {
        if (!isset($this->definition[$key])) {
            throw new \InvalidArgumentException('Expected shape definition at '
                . $key);
        }

        return $this->shapeFor($this->definition[$key]);
    }

    protected function shapeFor(array $definition)
    {
        return isset($definition['shape'])
            ? $this->shapeMap->resolve($definition)
            : Shape::create($definition, $this->shapeMap);
    }
}

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).