public getPackage ( string $packageKey ) : Neos\Flow\Package\PackageInterface | ||
$packageKey | string | |
리턴 | Neos\Flow\Package\PackageInterface | The requested package object |
public function getPackage($packageKey)
{
if (!$this->isPackageAvailable($packageKey)) {
throw new Exception\UnknownPackageException('Package "' . $packageKey . '" is not available. Please check if the package exists and that the package key is correct (package keys are case sensitive).', 1166546734);
}
return $this->packages[$packageKey];
}
/** * @test * @expectedException \Neos\Flow\Package\Exception\UnknownPackageException */ public function getPackageThrowsExceptionOnUnknownPackage() { $this->packageManager->getPackage('PrettyUnlikelyThatThisPackageExists'); }