private function SassScriptFunction::import in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/script/SassScriptFunction.php \SassScriptFunction::import()
* Imports files in the specified directory. *
Parameters
string path to directory to import: * @return array filenames imported
File
- phamlp/
sass/ script/ SassScriptFunction.php, line 84
Class
- SassScriptFunction
- SassScriptFunction class. Preforms a SassScript function. @package PHamlP @subpackage Sass.script
Code
private function import($dir) {
$files = array();
foreach (array_slice(scandir($dir), 2) as $file) {
if (is_file($dir . DIRECTORY_SEPARATOR . $file)) {
$files[] = $file;
require_once $dir . DIRECTORY_SEPARATOR . $file;
}
}
// foreach
return $files;
}