private function loadDefinition($version, $resource, $type, $key = null) : string
    {
        $definition = $this->definition($resource, $version);

        $classPath = $definition->$type;
        if (is_array($classPath) && array_key_exists($key, $classPath)) {
            $classPath = $classPath[$key];
        }

        if ($classPath === null) {
            throw ResourceNotDefinedException::resource($resource, $type);
        }

        return $classPath;
    }
private function loadDefinition($version, $resource, $type, $key = null) : string
    {
        $definition = $this->definition($resource, $version);

        $classPath = $definition->$type;
        if (is_array($classPath) && array_key_exists($key, $classPath)) {
            $classPath = $classPath[$key];
        }

        if ($classPath === null) {
            throw ResourceNotDefinedException::resource($resource, $type);
        }

        return $classPath;
    }
private function loadDefinition ( $ version , $ resource , $ type , $ key = null ) : string { $ definition = $ this -> definition ( $ resource , $ version ) ; $ classPath = $ definition -> $ type ; if ( is_array ( $ classPath ) && array_key_exists ( $ key , $ classPath ) ) { $ classPath = $ classPath [ $ key ] ; } if ( $ classPath === null ) { throw ResourceNotDefinedException :: resource ( $ resource , $ type ) ; } return $ classPath ; }
loads a definition

@param string $version
@param string $resource
@param string $type
@param string $key
@return string
loads a definition