コード例 #1
0
ファイル: loadbook.php プロジェクト: nemac/drupal-massupload
function endElement($parser, $name)
{
    global $glob;
    $content = array_pop($glob['contents']);
    if ($glob['inrow']) {
        if ($name == "ROW") {
            $glob['inrow'] = FALSE;
            if ($glob['current_type'] == "NODE") {
                process_node($glob['current_object']);
                ++$glob['page_count'];
            }
            if ($glob['current_type'] == "NODE_REVISIONS") {
                process_node_revision($glob['current_object']);
            }
            if ($glob['current_type'] == "BOOK") {
                process_book($glob['current_object']);
            }
            if ($glob['current_type'] == "MENU_LINKS") {
                process_menu_links($glob['current_object']);
            }
            if ($glob['current_type'] == "FILES") {
                process_files($glob['current_object']);
            }
            if ($glob['current_type'] == "CONTENT_FIELD_IMAGES") {
                process_content_field_images($glob['current_object']);
            }
        } else {
            $glob['current_object'][$name] = $content;
        }
    }
    $glob['depth']--;
}
コード例 #2
0
ファイル: vt-top12.php プロジェクト: bobbingwide/wp-top12
$files = array( "vanilla5", "cf7", "ai1seo", "yoastseo", "jetpack", "nextgen", "woocommerce", "wordfence", "analytics" );

process_files( $files );

$files = array( "vanilla5", "sfence2", "cfence2", "ssuper", "csuper" );

process_files( $files );


$files = array( "vanilla", "nofooter", "gfw", "yoastseo", "genesistant", "oik-widget-cache", "noclone" );

process_files( $files, "201602" );
*/
$files = array("vanilla", "gfw", "fewerdbs", "noclone");
process_files($files, "20160224");
function process_files($files, $host = "2016")
{
    $merger = new CSV_merger();
    $summary = new Group_Summary();
    foreach ($files as $file) {
        $stats = new VT_stats_top12();
        $stats->load_file($file, $host);
        $grouper = $stats->count_things();
        //$grouper = $stats->count_things_differently();
        $grouper->report_total();
        $summary->add_group($file, $grouper->total, $grouper->total_time);
        //$merger->append( $grouper->elapsed );
        $merger->append($grouper->percentages);
        //$merger->append( $grouper->groups );
    }