protected function package($name)
    {
        $exists = in_array($name, array_keys($this->packages));

        if ($exists === false || ! class_exists($this->packages[$name])) {
            $message = 'Package "' . $name . '" does not exists!';

            throw new \InvalidArgumentException((string) $message);
        }

        $function = array(new $this->packages[$name], $this->type);

        if (! $source = call_user_func_array($function, array())) {
            $message = '"%s" does not provide a path for the list of %s!';

            $message = sprintf($message, ucfirst($name), $this->type);

            throw new \InvalidArgumentException((string) $message);
        }

        return str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $source);
    }
protected function package($name)
    {
        $exists = in_array($name, array_keys($this->packages));

        if ($exists === false || ! class_exists($this->packages[$name])) {
            $message = 'Package "' . $name . '" does not exists!';

            throw new \InvalidArgumentException((string) $message);
        }

        $function = array(new $this->packages[$name], $this->type);

        if (! $source = call_user_func_array($function, array())) {
            $message = '"%s" does not provide a path for the list of %s!';

            $message = sprintf($message, ucfirst($name), $this->type);

            throw new \InvalidArgumentException((string) $message);
        }

        return str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $source);
    }
protected function package ( $ name ) { $ exists = in_array ( $ name , array_keys ( $ this -> packages ) ) ; if ( $ exists === false || ! class_exists ( $ this -> packages [ $ name ] ) ) { $ message = 'Package "' . $ name . '" does not exists!' ; throw new \ InvalidArgumentException ( ( string ) $ message ) ; } $ function = array ( new $ this -> packages [ $ name ] , $ this -> type ) ; if ( ! $ source = call_user_func_array ( $ function , array ( ) ) ) { $ message = '"%s" does not provide a path for the list of %s!' ; $ message = sprintf ( $ message , ucfirst ( $ name ) , $ this -> type ) ; throw new \ InvalidArgumentException ( ( string ) $ message ) ; } return str_replace ( array ( '/' , '\\' ) , DIRECTORY_SEPARATOR , $ source ) ; }
Return the value of the required type from the specified package.

@param  string $package
@return string
Return the value of the required type from the specified package .