public getClassNamesByScope ( integer $scope ) : array | ||
$scope | integer | One of the ObjectConfiguration::SCOPE_ constants |
Résultat | array | An array of class names configured with the given scope |
public function getClassNamesByScope($scope)
{
if (!isset($this->cachedClassNamesByScope[$scope])) {
foreach ($this->objects as $objectName => $information) {
if ($information['s'] === $scope) {
if (isset($information['c'])) {
$this->cachedClassNamesByScope[$scope][] = $information['c'];
} else {
$this->cachedClassNamesByScope[$scope][] = $objectName;
}
}
}
}
return $this->cachedClassNamesByScope[$scope];
}