public function getChildren(AssetFactory $factory, $content, $loadPath = null) { $sc = new Compiler(); $sc->addImportPath($loadPath); foreach ($this->importPaths as $path) { $sc->addImportPath($path); } $children = array(); foreach (CssUtils::extractImports($content) as $match) { $file = $sc->findImport($match); if ($file) { $children[] = $child = $factory->createAsset($file, array(), array('root' => $loadPath)); $child->load(); $children = array_merge($children, $this->getChildren($factory, $child->getContent(), $loadPath)); } } return $children; }