DataSift\Storyplayer\HostLib\VagrantVms::checkGroupDefinition PHP Метод

checkGroupDefinition() защищенный Метод

Check environmental details
protected checkGroupDefinition ( stdClass $groupDef )
$groupDef stdClass
    protected function checkGroupDefinition($groupDef)
    {
        // make sure we like the provided details
        if (!isset($groupDef->details)) {
            throw new E5xx_ActionFailed(__METHOD__, "missing groupDef->details");
        }
        if (!isset($groupDef->details->machines)) {
            throw new E5xx_ActionFailed(__METHOD__, "missing groupDef->details->machines");
        }
        if (empty($groupDef->details->machines)) {
            throw new E5xx_ActionFailed(__METHOD__, "groupDef->details->machines cannot be empty");
        }
        // make sure we have a Vagrantfile
        $expectedVagrantfile = $this->getVagrantDir($groupDef) . "/Vagrantfile";
        if (!file_exists($expectedVagrantfile)) {
            throw new E5xx_ActionFailed(__METHOD__, "no Vagrantfile; expected it to be here: {$expectedVagrantfile}");
        }
    }