Prose\Ec2InstanceBase::__construct PHP Метод

__construct() публичный Метод

public __construct ( StoryTeller $st, $params = [] )
$st DataSift\Storyplayer\PlayerLib\StoryTeller
    public function __construct(StoryTeller $st, $params = array())
    {
        // call our parent
        parent::__construct($st, $params);
        // get the VM details from the hosts table
        $this->vmDetails = fromHostsTable()->getDetailsForHost($params[0]);
        if ($this->vmDetails) {
            // remember the name of this VM
            $this->instanceName = $this->vmDetails->ec2Name;
            // get the data about the instance from EC2
            $this->instance = fromEc2()->getInstance($this->instanceName);
            // add the instance data to the vmDetails too, to keep that
            // up to date
            $this->vmDetails->ec2Instance = $this->instance;
        }
    }