/** * Return the children from a given module. Used for building the tree of the page * * @param String module name * * @return DataObjectSet */ public static function get_pages_from_folder($folder) { $handle = opendir($folder); $output = new DataObjectSet(); if ($handle) { $extensions = DocumentationService::get_valid_extensions(); $ignore = DocumentationService::get_ignored_files(); while (false !== ($file = readdir($handle))) { if (!in_array($file, $ignore)) { $file = strtolower($file); $clean = ($pos = strrpos($file, '.')) ? substr($file, 0, $pos) : $file; $output->push(new ArrayData(array('Title' => self::clean_page_name($file), 'Filename' => $clean, 'Path' => $folder . $file . '/'))); } } } return $output; }