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);
    }