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