Sindbad~EG File Manager

Current Path : /home/escuelai/public_html/it/vendor/swaggest/json-schema/src/
Upload File :
Current File : /home/escuelai/public_html/it/vendor/swaggest/json-schema/src/NameMirror.php

<?php

namespace Swaggest\JsonSchema;

class NameMirror
{
    /**
     * NameMirror constructor.
     * @param null|string[] $mapping a map of propertyName to dataName
     */
    public function __construct($mapping = null)
    {
        $this->mapping = $mapping;
    }

    private $mapping;

    public function __get($name)
    {
        if ($this->mapping !== null && isset($this->mapping[$name])) {
            return $this->mapping[$name];
        }

        return $name;
    }

    public function __set($name, $value)
    {
        throw new \Exception('Unexpected write to read-only structure');
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists