예제 #1
0
파일: Acl.php 프로젝트: alekc/phbind
    function __toString()
    {
        $output = GenericHelper::prefixBySpaces($this->_addressMatchList, 4);
        return <<<EOF
acl "{$this->_name}"{
{$output}
};
EOF;
    }
예제 #2
0
파일: Zone.php 프로젝트: alekc/phbind
    /**
     * @return string
     */
    public function getAsString()
    {
        $commonOptions = parent::getAsString();
        $output = <<<EOF
zone "{$this->getName()}" {
    {$this->getGenericField("type", $this->_type)}
    {$this->getGenericField("file", $this->_file, true)}
    {$this->getGenericFieldEnclosedByBrackets("allow-update", $this->_allowUpdate)}

    {$this->getGenericField("check-names", $this->_checkNames)}
    {$this->getGenericField("delegation-only", $this->_delegationOnly)}

    {$this->getGenericFieldEnclosedByBrackets("in-view", $this->_inView, true)}

    {$this->getGenericFieldEnclosedByBrackets("server-addresses", $this->_serverAddresses)}
    {$this->getGenericFieldEnclosedByBrackets("server-names", $this->_serverNames)}
    {$this->getGenericFieldEnclosedByBrackets("update-policy", $this->_updatePolicy)}

    {$this->prefixBySpaces($commonOptions, 4)}
};
EOF;
        $output = GenericHelper::removeEmptyLines($output);
        return $output;
    }
예제 #3
0
파일: Options.php 프로젝트: alekc/phbind
 /**
  * @param \Bind\Types\YesNo $requestIxFr
  *
  * @return self Instance
  */
 public function setRequestIxFr($requestIxFr)
 {
     GenericHelper::checkIfZoneIsSlaveAndThrowExceptionIfNot($this->_type);
     $this->_requestIxFr = GenericHelper::checkIfObjectIsInstanceOfYesNoThrowExceptionOtherWise($requestIxFr);
     return $this;
 }