Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  Tool_JIT  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample
Class: Tool_JIT
Generate data structures in JSON for JIT
Author: By
Last change:
Date: 2009-02-09 10:43
Size: 8,114 bytes
 

Contents

Class file image Download
<?php

ini_set
("max_execution_time",3);
include_once(
"Tool_JIT.class.php");

$node     Tool_JIT::getInstance();
$node    ->set("190","Pearl Jam")
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("306208","Pearl Jam &amp; Cypress Hill")
                ->
add("Pearl Jam","collaboration")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("84","Cypress Hill")
                        ->
add("Pearl Jam &amp; Cypress Hill","collaboration")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("107877","Neil Young &amp; Pearl Jam")
                ->
add("Pearl Jam","collaboration")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("964","Neil Young")
                        ->
add("Neil Young &amp; Pearl Jam","collaboration")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236797","Jeff Ament")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1756","Temple of the Dog")
                        ->
add("Jeff Ament","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("14581","Mother Love Bone")
                        ->
add("Jeff Ament","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("50188","Green River")
                        ->
add("Jeff Ament","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("65452","M.A.C.C.")
                        ->
add("Jeff Ament","collaboration")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("115632","Three Fish")
                        ->
add("Jeff Ament","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("346850","Gossman Project")
                        ->
add("Jeff Ament","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("41529","Stone Gossard")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1756","Temple of the Dog")
                        ->
add("Stone Gossard","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("14581","Mother Love Bone")
                        ->
add("Stone Gossard","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("24119","Brad")
                        ->
add("Stone Gossard","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("50188","Green River")
                        ->
add("Stone Gossard","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("346850","Gossman Project")
                        ->
add("Stone Gossard","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("131161","Eddie Vedder")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1756","Temple of the Dog")
                        ->
add("Eddie Vedder","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("72007","Eddie Vedder &amp; Zeke")
                        ->
add("Eddie Vedder","collaboration")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("236657","Bad Radio")
                        ->
add("Eddie Vedder","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("432176","Beck &amp; Eddie Vedder")
                        ->
add("Stone Gossard","collaboration")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236583","Mike McCready")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1744","Mad Season")
                        ->
add("Mike McCready","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1756","Temple of the Dog")
                        ->
add("Mike McCready","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("43661","\$10,000 Gold Chain")
                        ->
add("Mike McCready","collaboration")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("65452","M.A.C.C.")
                        ->
add("Mike McCready","collaboration")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("153766","The Rockfords")
                        ->
add("Mike McCready","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("346850","Gossman Project")
                        ->
add("Mike McCready","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236583","Matt Cameron")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1111","Soundgarden")
                        ->
add("Matt Cameron","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("1756","Temple of the Dog")
                        ->
add("Matt Cameron","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("11783","Queens of the Stone Age")
                        ->
add("Matt Cameron","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("65452","Wellwater Conspiracy")
                        ->
add("Matt Cameron","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("9570","Eleven")
                        ->
add("Matt Cameron","supporting")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("65452","M.A.C.C.")
                        ->
add("Matt Cameron","collaboration")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("353097","Tone Dogs")
                        ->
add("Matt Cameron","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236583","Dave Krusen")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("236594","Candlebox")
                        ->
add("Dave Krusen","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236022","Matt Chamberlain")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("54761","Critters Buggin")
                        ->
add("Matt Chamberlain","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("92043","Edie Brickell and New Bohemians")
                        ->
add("Matt Chamberlain","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236022","Dave Abbruzzese")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("276933","Green Romance Orchestra")
                        ->
add("Dave Abbruzzese","member of band")
                        ->
addChild()
                )
        )
        ->
addChild(
            
Tool_JIT::getInstance()
                ->
set("236612","Jack Irons")
                ->
add("Pearl Jam","member of band")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("4619","Redd Kross")
                        ->
add("Jack Irons","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("9570","Eleven")
                        ->
add("Jack Irons","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("12389","Red Hot Chili Peppers")
                        ->
add("Jack Irons","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("114288","Anthym")
                        ->
add("Jack Irons","member of band")
                        ->
addChild()
                )
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("240013","What is this?")
                        ->
add("Jack Irons","member of band")
                        ->
addChild()
                )
        )
        ;

        
// inject at the end
        
$node->get()->children[] = Tool_JIT::getInstance()
                ->
set("12121","Tom Schaefer")
                ->
add("Pearl Jam","supporting")
                ->
addChild(
                    
Tool_JIT::getInstance()
                        ->
set("21212","Wooseling Heights")
                        ->
add("Tom Schaefer","supporting")
                        ->
addChild()
                );



echo 
$node->render();