Ejemplo n.º 1
0
 public function process_show_all($vars, $contents)
 {
     if (strpos($contents, 'perch:showall')) {
         $vars['perch_namespace'] = 'perch:' . $this->namespace;
         $s = '/<perch:showall[^>]*>/s';
         $table = PerchUtil::table_dump($vars, 'showall') . '<link rel="stylesheet" href="' . PERCH_LOGINPATH . '/core/assets/css/debug.css" />';
         if (preg_match_all($s, $contents, $matches, PREG_SET_ORDER)) {
             if (count($matches)) {
                 foreach ($matches as $match) {
                     $contents = str_replace($match[0], $table, $contents);
                 }
             }
         }
     }
     return $contents;
 }
 public function process_show_all($vars, $contents)
 {
     if (strpos($contents, 'perch:showall')) {
         $vars['perch_namespace'] = 'perch:' . $this->namespace;
         $s = '/<perch:showall[^>]*>/s';
         return preg_replace($s, PerchUtil::table_dump($vars, 'showall') . '<link rel="stylesheet" href="' . PERCH_LOGINPATH . '/core/assets/css/debug.css" />', $contents);
     }
     return $contents;
 }