/** * Finds the required template by $key in $fragments and returns it if * found. * If the current key is not in $fragments, searches in $fallback * (potentially recursively). * @arg string $key The key of the template to locate. Not null. * @return string|null The requested template, if found. */ private function i_findFragment($key) { assert($key !== null); assert(is_string($key)); assert($this->fragments !== null); if (array_key_exists($key, $this->fragments)) { return $this->fragments[$key]; } else { if (null !== $this->fallback) { return $this->fallback->i_findFragment($key); } else { return null; } } }