SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: How's this?

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2003
    Location
    with my kids
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How's this?

    PHP Code:
    $post=& new ForumPost('sitepoint');
    $post->preview();
    if(
    $post->isValid()){
      
    $rant =& new Rant();
    }
    else {
     
    $gun =& new DangerousWeaponFactory(TYPE_GUN);
     if(
    $gun->hasBullets() === false){
      
    $gun->load();
     }
     
    $gun->setTarget('head');
     
    $gun->aim();
     if(!
    $gun->pullTrigger()){
       
    $ex =& new Exception('misfire');
       
    header('Location: new_rant.php');
       exit;
     }
     else {
      die();
     }
    }

    $rh =& new RantHandler($rant);
    $tpl =& $rh->getTemplate();
    $rh->currentRant->add('i hate objects'$tplVars);
    $rh->currentRant->add('Bye'$tplVars);
    $tpl->parse();
    $post->submit($tpl->display()); 

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope you're not unsupervised at the location in your profile
    From the English nation to a US location.

  3. #3
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would you be willing to post the source for your DangerousWeaponFactory?

    Matt

  4. #4
    Non-Member
    Join Date
    Jan 2004
    Location
    Planet Earth
    Posts
    1,764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mass Suicides ?

  5. #5
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mwmitchell
    Would you be willing to post the source for your DangerousWeaponFactory?
    I don't think you've considered the export restrictions.
    Dagfinn Reiersøl
    PHP in Action / Blog / Twitter
    "Making the impossible possible, the possible easy,
    and the easy elegant"
    -- Moshe Feldenkrais

  6. #6
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to make the point about export restrictions clearer:

    PHP Code:
    $factory = new DangerousWeaponsFactory;
    $inspector = new WeaponsInspector;
    $inspector->inspect($factory);
    $report $inspector->report();
    if (
    $report->hasWMD()) {
        
    $war = new War($this->country,$factory->getCountry());
        
    $war->start();

    Dagfinn Reiersøl
    PHP in Action / Blog / Twitter
    "Making the impossible possible, the possible easy,
    and the easy elegant"
    -- Moshe Feldenkrais


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •