Deserializes packages from packagist.org, e.g.
http://packagist.org/packages/Symfony/Router.json

@param name the package name, such as Symfony/Router
@return the deserialized package
@throws IOException
972612
public static RepositoryPackage fromPackagist(String name) throws Exception {
		
		PackagistDownloader downloader = new PackagistDownloader();
		return downloader.loadPackage(name);
	}
1213182
public function getPackage($name)
    {
        return isset($this->packages[$name = strtolower($name)]) ? $this->packages[$name] : null;
    }
96939
public static byte[] externalize(Name name) {
        return externalize(name.getByteArray(), name.getByteOffset(), name.getByteLength());
    }
471342
public byte[] getPacketBytes() {
        byte[] result = new byte[packetBytes.length];
        System.arraycopy(packetBytes, 0, result, 0, packetBytes.length);
        return result;
    }
471421
public function getPackagesByName($name, $type = '')
    {
        $query = ['q' => $name];

        if ($type != '') {
            $query['type'] = $type;
        }

        return $this->makeRequest('/search.json', $query);
    }
37109
private MessageResources lookupStrutsBundle(String name) {
        Object value = _servletContext.getAttribute(name);
        if(value instanceof MessageResources)
            return (MessageResources)value;
        else {
            if(value != null)
                LOGGER.warn("Can not resolve module bundle with name \"" +
                    name
                    + "\".  The object resolved from ServletContext is of type "
                    + value.getClass().toString());
            return null;
        }
    }
603777
public function getPackage($name = null)
    {
        /** @var PackageResolver $resolver */
        $resolver = $this->container->get('package.resolver');

        return $resolver->getPackage($name);
    }
1110746
public static <Param> PathParamSerializer<Param> required(String name, Function<String, Param> deserialize,
                                                              Function<Param, String> serialize) {
        return new NamedPathParamSerializer<Param>(name) {
            @Override
            public PSequence<String> serialize(Param parameter) {
                return TreePVector.singleton(serialize.apply(parameter));
            }

            @Override
            public Param deserialize(PSequence<String> parameters) {
                if (parameters.isEmpty()) {
                    throw new IllegalArgumentException(name + " parameter is required");
                } else {
                    return deserialize.apply(parameters.get(0));
                }
            }
        };
    }
639763
protected function package($name)
    {
        $package = $this->obtainPackage($name);

        if ($package == -1) {
            return;
        }

        list($name, $providers, $aliases, $after) = array_fill(0, 4, null);
        extract($package, EXTR_IF_EXISTS);

        $this->requireComposerPackage($name);

        if ($this->setupLaravelConfigFile($providers, $aliases) == -1) {
            return -1;
        }

        $this->executeScriptAfterPackageInstallation($after);
    }
681622
public OvhAsyncTask<OvhMigrationOfferResponse> packName_migration_offers_POST(String packName) throws IOException {
		String qPath = "/pack/xdsl/{packName}/migration/offers";
		StringBuilder sb = path(qPath, packName);
		String resp = exec(qPath, "POST", sb.toString(), null);
		return convertTo(resp, t11);
	}
1275292
private function getPackageByName(iterable $packages, string $name): ?PackageInterface
    {
        foreach ($packages as $package) {
            if ($package->getName() === $name) {
                return $package;
            }
        }

        return null;
    }
981287
protected function getPackage(RepositoryInterface $repos, $name)
    {
        $name = strtolower($name);
        $pool = new Pool('dev');
        $pool->addRepository($repos);
        $matches = $pool->whatProvides($name);

        foreach ($matches as $index => $package) {
            // skip providers/replacers
            if ($package->getName() !== $name) {
                unset($matches[$index]);
                continue;
            }

            return $package;
        }
    }
478145
@Override
    public Packet getNextPacket() throws IOException {
        final Object content = parseSipContent();
        if (content instanceof SDP) {
            return new SDPPacketImpl(this, (SDP)content);
        }
        return null;
    }
1010363
@SuppressWarnings("unchecked")
    @Override
    public final <T> T deserialize(byte[] content, Class<T> clazz) throws SerializerException {
        if (byte[].class.equals(clazz)) {
            return (T) content;
        }
        throw new SerializerException("Unable to deserialize to type '" + clazz.getName() + "'");
    }
905484
private function obtainPackage($name)
    {
        $package = $this->getPackageFromConfig($name);

        if ($package == null) {
            $this->showPackageNotFoundError($name);

            return -1;
        }

        return $package;
    }
526262
public function getPackage($name, $version = NULL, $variant = 'default')
	{
		$name = strtolower($name);
		if (!isset($this->packages[$name])) {
			throw new PackageNotFoundException('Package "' . $name . '" does not exist');
		}

		if (!$this->packages[$name]->hasVariant($variant)) {
			throw new PackageVariantNotFoundException('Package "' . $name . '" does not have variant "' . $variant . '"');
		}

		/* @var Package */
		$package = $this->packages[$name];

		if ($version) {
			$version = str_replace('~', NULL, $version);
			$version = str_replace('^', '>=', $version);
			$matches = Strings::match($version, '~(lt|<>|<=|le|>=|<|>|gt|ge|==|=|eq|!=|ne)*\s?(.+)~i');

			$versionNumber = $matches[2];
			$versionOperator = $matches[1];

			if (version_compare($package->getVersion(), $versionNumber, $versionOperator ?: '>=') === FALSE) {
				throw new BadPackageVersionException('Package "' . $name . '" is version "' . $package->getVersion() . '", but version "' . $version . '" required.');
			}
		}

		return $package;
	}
184615
public JsonArray getJsonArray(String name) throws JsonException {
        JsonElement el = get(name);
        if (!el.isJsonArray()) {
            throw Util.typeMismatch(name, el, "JsonArray");
        }
        return el.asJsonArray();
    }