protected getPackagesData ( string $packageKey = null ) : array | ||
$packageKey | string | if specified, only the package data for the given key is returned |
return | array | in the format [' |
protected function getPackagesData($packageKey = null)
{
$this->initialize();
if ($packageKey === null) {
return $this->packagesData;
}
if (!isset($this->packagesData[$packageKey])) {
throw new \InvalidArgumentException(sprintf('Package "%s" was not found', $packageKey), 1421667044);
}
return array($packageKey => $this->packagesData[$packageKey]);
}