| @@ 153-165 (lines=13) @@ | ||
| 150 | * | |
| 151 | * @return bool Returns the new number of elements in the array. | |
| 152 | */ | |
| 153 | public function isRequested($checkScopeSegment) | |
| 154 |     { | |
| 155 |         if ($this->parentScopes) { | |
| 156 | $scopeArray = array_slice($this->parentScopes, 1); | |
| 157 | array_push($scopeArray, $this->scopeIdentifier, $checkScopeSegment); | |
| 158 |         } else { | |
| 159 | $scopeArray = [$checkScopeSegment]; | |
| 160 | } | |
| 161 | ||
| 162 |         $scopeString = implode('.', (array) $scopeArray); | |
| 163 | ||
| 164 | return in_array($scopeString, $this->manager->getRequestedIncludes()); | |
| 165 | } | |
| 166 | ||
| 167 | /** | |
| 168 | * Is Excluded. | |
| @@ 181-193 (lines=13) @@ | ||
| 178 | * | |
| 179 | * @return bool | |
| 180 | */ | |
| 181 | public function isExcluded($checkScopeSegment) | |
| 182 |     { | |
| 183 |         if ($this->parentScopes) { | |
| 184 | $scopeArray = array_slice($this->parentScopes, 1); | |
| 185 | array_push($scopeArray, $this->scopeIdentifier, $checkScopeSegment); | |
| 186 |         } else { | |
| 187 | $scopeArray = [$checkScopeSegment]; | |
| 188 | } | |
| 189 | ||
| 190 |         $scopeString = implode('.', (array) $scopeArray); | |
| 191 | ||
| 192 | return in_array($scopeString, $this->manager->getRequestedExcludes()); | |
| 193 | } | |
| 194 | ||
| 195 | /** | |
| 196 | * Push Parent Scope. | |