public static function find_by_month($y, $m, $app = null) { $env = $app->environment; $posts = array(); $files = PhybridLib::get_file_list($env['ARTICLES_ROOT_PATH'] . '/' . $y . '/' . $m); rsort($files); foreach ($files as $file) { $post = new PhybridPost($file, $app); if ($post->url['y'] == $y && $post->url['m'] == $m) { $posts[] = $post; } } return $posts; }
public static function all($app = null) { $env = $app->environment; $pages = array(); $files = PhybridLib::get_file_list($env['PAGES_ROOT_PATH']); foreach ($files as $file) { $page = new PhybridPage($file, $app); $ignore = false; foreach ($env['IGNORE_PAGE_IDS'] as $id) { if ($id == $page->id) { $ignore = true; break; } } if (!$ignore) { $pages[] = $page; } } usort($pages, '\\Phybrid\\PhybridPage::cmp'); return $pages; }