Blog The linguistic musings of a creative virtuoso.

PHP Script myDay.class.php

I've had nothing to do (I'm lying; I could have been working on the website) the last couple hours. Which in my personal opinion is good. I'd much rather have nothing to do then to be bored. Lol. In the midst of doing nothing I was however browsing the internet and came across a PHP script on getting drunk and another PHP script on just making toast. So voila! This is my piss-poor attempt at being funny with a PHP class function. Simply titled myDay.class.php. Bare in mind (if you can read this script), this is just all in fun and meant in no way to offend. Although if it does offend you, I'd show you a couple ways I could care a lot less but I don't even care to do that. Besides if I could care less, you know I probably would.

myday.class.php
/**
 * myDay.class.php
 *
 * @author demon.devin
 * @version 1.0 beta 1
 * @uses drugs
 * @todo hustle
 * @return laughter
 */

class myDay {

    public function &live(self $objective, $mindState) {
        return $objective->$mindState;
    }
    
    protected function invoke($objective, $mindState, $how) {
        return call_user_func_array(array($objective, $mindState), $how);
    }
}

class Morning extends myDay {
    private $name;
    protected $tasks;

    public function __construct($mindState) {
        $this->name = $mindState;
        $this->tasks = array();
    }
    
    public function initialize(Evening $high, $get) {
        $this->tasks[$get] = $high;

        // instead, we get a reference from the dispatcher:
        $current = &$this->live($high, "sober");

        // ... and change that:
        $current = $this;
    }
    public function loaded($get) {
        $this->invoke($this->tasks[$get], "loaded", array());
    }
}

class Evening extends myDay {
    private $drug;
    private $function;
    private $mindState;
    protected $owner;

    public function __construct($dope, $relax, $high) {
        $this->drug = $dope;
        $this->function = $relax;
        $this->mindState = $high;
    }

    protected function loaded() {
        echo ("Smoking ".$this->drug." to get ".$this->mindState." and ".$this->function."\n");
    }
}

$now = new Morning("sober");
$soon = new Evening('weed', 'unwind', 'loaded');
$now->initialize($soon, "smoke");
$now->loaded("smoke");

For those of you who are wondering this just outputs how I spend most of my evenings which is: "Smoking weed to get loaded and unwind" Enjoy!

Yes, I was high in the making of this post. Lol.


0

Leave a Comment