示例#1
0
function echoall($string)
{
    //  echo "<div id='oliv_debug'>";
    if (is_array($string)) {
        echo count($string) . " elements";
        echo "<pre>" . renderall($string) . "</pre>";
    } elseif (is_object($string)) {
        echo "<pre>" . renderall($string) . "</pre>";
    } else {
        switch ($string) {
            case 'NULL':
                echo "*NULL";
                break;
            case "":
                echo "*empty";
                break;
            case 'FALSE':
                echo "*FALSE";
                break;
            default:
                echo $string;
                break;
        }
    }
    echo "<br>";
    //  echo "</span>";
}
示例#2
0
 public static function __callStatic($method, $options)
 {
     $content = $options[0];
     $tag = $options[1];
     $nodes = $content->XPath("//{$tag}");
     for ($i = 0; $i < count($nodes); $i++) {
         // if source, make edit possible
         $valueName = (string) $nodes[$i];
         if ($valueName) {
             $val = renderall($tag::$valueName());
             $nodes[$i][0] = $val;
         }
     }
     return $content;
 }