Plus all it's children-children recursively and returns a generator
providing them
This is used to collect all blocks, imports and mixins and handle them
in a special way
If you need a normal array, use ->findArray() instead instead
/** * Collects all imports and handles them via ->handleImport. * * @param Node $node the root Node to search imports in * * @return $this * @throws Exception when the allowImports-options is set to false */ protected function handleImports(Node $node) { foreach ($node->find('import') as $importNode) { if (!$this->options['allowImports']) { $this->throwException('Imports are not allowed in this compiler instance', $node); } $this->handleImport($importNode); } return $this; }
/** * Collects all imports and handles them via ->handleImport. * * @param Node $node the root Node to search imports in * * @return $this * @throws Exception when the allowImports-options is set to false */ protected function handleImports(Node $node) { foreach ($node->find('import') as $importNode) { if (!$this->options['allow_imports']) { $this->throwException('Imports are disabled in this Jade compiler instance through the [`allow_imports`] option. ' . 'Set it to [`false`] (default) to enable imports again', $node); } $this->handleImport($importNode); } return $this; }