/**
  * Don't allow the usual search/authz params
  *
  * @param Rframe_Parser $parser
  * @param array         $path
  * @param array         $inits
  */
 public function __construct($parser, $path = array(), $inits = array())
 {
     parent::__construct($parser, $path, $inits);
     air2_array_remove($this->search_param, $this->QUERY_ARGS);
     air2_array_remove($this->authz_read_param, $this->QUERY_ARGS);
     air2_array_remove($this->authz_write_param, $this->QUERY_ARGS);
     air2_array_remove($this->authz_manage_param, $this->QUERY_ARGS);
 }
/**
 * Removes an item (or an array of items) from an array.
 *
 * @param mixed   $needle
 * @param array   &$haystack
 * @return array the haystack array
 */
function air2_array_remove($needle, &$haystack)
{
    if (is_array($needle)) {
        foreach ($needle as $val) {
            air2_array_remove($val, $haystack);
        }
    } else {
        $idx = array_search($needle, $haystack);
        if ($idx !== false) {
            array_splice($haystack, $idx, 1);
        }
    }
    return $haystack;
}
 /**
  * Get an array of css includes
  *
  * @return array $css
  */
 public function css_includes()
 {
     // only need compressed file, if it exists
     if (file_exists(AIR2_DOCROOT . '/css/air2-compressed.css')) {
         return array(air2_uri_for('css/air2-compressed.css'));
     }
     // recursively scan css directory
     $css = air2_dirscan(AIR2_DOCROOT . '/css/', '/.css$/');
     $rmv = array('docbook.css', 'login.css', 'ie.css', 'print.css', 'ext-theme-air2.css', 'query.css', 'pinform.css', 'third_party.css');
     air2_array_remove($rmv, $css);
     // change to absolute paths
     foreach ($css as &$file) {
         $mtime = filemtime(AIR2_DOCROOT . '/css/' . $file);
         $file = air2_uri_for("css/{$file}", array('_' => $mtime));
     }
     return $css;
 }