Esempio n. 1
0
function testBed()
{
    $p = new el('p');
    $br = new el('br');
    echo 'This sentence should break here' . $br . 'if break element was created.' . $br . $br;
    $img = new el('img', $atts = array('src' => '../../images/test1.jpg', 'width' => '250', 'height' => '149'));
    echo 'A plain image should appear here: ' . $img . $br . $br;
    $atts = array("href" => "http://www.dogpile.com/", 'title' => 'Can "you" guess?', 'text' => 'My favourite search engine. =)');
    $a = new el('a', $atts);
    echo $a . $br . $br;
    $a->re_set('href', 'http://www.google.com');
    $a->re_set('title', "I'm now a sheep I in the doghouse. o_o");
    $a->re_set('text', "I'm now an easily herded simple minded sheep like everyone else. =( ");
    echo $a . $br . $br;
    $a->remove('href');
    $a->re_set('text', "I am now a dead link. =|");
    echo $a . $br . $br;
    $a->remove('text');
    $a->set('href', 'http://www.mamma.com/');
    $a->re_set('title', "You better good or mama will put you in the doghouse. o_~");
    $a->nest($img);
    echo 'Image link points to mother of all search engines: ' . $a . $br . $br;
    $a->clear();
    echo 'I am now a dead image-link: ' . $a . $br . $br;
}