Esempio n. 1
0
 /**
  * Is Excluded.
  *
  * Check if - in relation to the current scope - this specific segment should
  * be excluded. That means, if a.b.c is excluded and the current scope is a.b,
  * then c will not be allowed in the transformation whether it appears in
  * the list of default or available, requested includes.
  *
  * @internal
  *
  * @param string $checkScopeSegment
  *
  * @return bool
  */
 public function isExcluded($checkScopeSegment)
 {
     if ($this->parentScopes) {
         $scopeArray = array_slice($this->parentScopes, 1);
         array_push($scopeArray, $this->scopeIdentifier, $checkScopeSegment);
     } else {
         $scopeArray = [$checkScopeSegment];
     }
     $scopeString = implode('.', (array) $scopeArray);
     return in_array($scopeString, $this->manager->getRequestedExcludes());
 }