private function SassScriptFunction::import in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/SassScriptFunction.php \SassScriptFunction::import()
Imports files in the specified directory.
Parameters
string path to directory to import:
Return value
array filenames imported
File
- phpsass/
script/ SassScriptFunction.php, line 126
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;
}