isDot()) { continue; } $name = $file_info->getFilename(); if ($name == $defaults || !preg_match('/^fgcf_\w*\.php$/', $name, $matches)) { continue; } // Cannot use require_once, as scanning may load them once before entering // here, and they need to be reported each time. require $name; // will define $view and $handler if (!isset($view) || !isset($view->name)) { watchdog('fgcf', 'Ill-formed view @name.', array('@name' => $name), WATCHDOG_NOTICE); } else { $views[$view->name] = $view; } unset($view, $handler); } return $views; }