Destiny\DestinyManifest::instance PHP Method

instance() protected method

protected instance ( $type, $key )
    protected function instance($type, $key)
    {
        $key = (string) $key;
        $instance = array_get(static::$instances, "{$type}.{$key}");
        if (!$instance) {
            $namespace = "\\Destiny\\Definitions\\";
            $class = array_get(['Class' => 'CharacterClass'], $type, $type);
            $className = $namespace . $class;
            $instance = new $className($this->load($type, $key));
            static::$instances[$class][$key] = $instance;
        }
        return $instance;
    }