protected function _scope($entity) {
		$scope = [];
		foreach ($this->_config['scope'] as $key => $value) {
			if (is_numeric($key)) {
				if (isset($entity, $value)) {
					$scope[$value] = $entity->$value;
				} else {
					$message = "The `{$value}` scope in not present in the entity.";
					throw new UnexpectedValueException($message);
				}
			} else {
				$scope[$key] = $value;
			}
		}
		return $scope;
	}
protected function _scope($entity) {
		$scope = [];
		foreach ($this->_config['scope'] as $key => $value) {
			if (is_numeric($key)) {
				if (isset($entity, $value)) {
					$scope[$value] = $entity->$value;
				} else {
					$message = "The `{$value}` scope in not present in the entity.";
					throw new UnexpectedValueException($message);
				}
			} else {
				$scope[$key] = $value;
			}
		}
		return $scope;
	}
protected function _scope ( $ entity ) { $ scope = [ ] ; foreach ( $ this -> _config [ 'scope' ] as $ key => $ value ) { if ( is_numeric ( $ key ) ) { if ( isset ( $ entity , $ value ) ) { $ scope [ $ value ] = $ entity -> $ value ; } else { $ message = "The `{$value}` scope in not present in the entity." ; throw new UnexpectedValueException ( $ message ) ; } } else { $ scope [ $ key ] = $ value ; } } return $ scope ; }
Setting a scope to an entity node.

@param object $entity
@return array The scope values
@throws UnexpectedValueException
Setting a scope to an entity node .