Prose\Prose::__construct PHP Method

__construct() public method

public __construct ( StoryTeller $st, $args = [] )
$st DataSift\Storyplayer\PlayerLib\StoryTeller
    public function __construct(StoryTeller $st, $args = array())
    {
        // save the StoryTeller object; we're going to need it!
        $this->st = $st;
        // save any arguments that have been passed into the constructor
        // our child classes may be interested in them
        if (!is_array($args)) {
            throw new E5xx_ActionFailed(__METHOD__);
        }
        $this->args = $args;
        // setup the page context
        $this->initPageContext();
        // run any context-specific setup that we need
        $this->initActions();
    }

Usage Example

Ejemplo n.º 1
0
 public function __construct(Storyteller $st, $params = [])
 {
     // call our parent first
     parent::__construct($st, $params);
     // make sure that we have a ZMQ socket
     if (!isset($params[0]) || !$params[0] instanceof ZMQSocket) {
         throw new E5xx_ActionFailed(__METHOD__, "first param must be a ZMQ socket");
     }
 }
All Usage Examples Of Prose\Prose::__construct