Example #1
0
function render_sector($sector_path)
{
    echo Sector::get($sector_path);
}
Example #2
0
 function testSectorPrepend()
 {
     Sector::reset();
     Sector::start("/ciccia/pluto_prepend");
     echo "Ciao!!";
     Sector::end();
     $this->assertEqual(Sector::get("/ciccia/pluto_prepend"), "Ciao!!", "I dati non sono stati memorizzati correttamente nel settore!!");
     try {
         Sector::start("/ciccia/pluto_prepend", Sector::STORE_MODE_PREPEND);
         echo "Mondo!!";
         Sector::end();
         $this->assertEqual(Sector::get("/ciccia/pluto_prepend"), "Mondo!!Ciao!!", "I dati non sono stati memorizzati correttamente nel settore!!");
     } catch (Exception $ex) {
         Sector::reset();
         $this->fail("Errore durante un prepend!! con STORE_MODE_PREPEND !!");
     }
 }