Exemplo n.º 1
0
Arquivo: Acl.php Projeto: alekc/phbind
    function __toString()
    {
        $output = GenericHelper::prefixBySpaces($this->_addressMatchList, 4);
        return <<<EOF
acl "{$this->_name}"{
{$output}
};
EOF;
    }
Exemplo n.º 2
0
    /**
     * @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;
    }
Exemplo n.º 3
0
 /**
  * @param \Bind\Types\YesNo $requestIxFr
  *
  * @return self Instance
  */
 public function setRequestIxFr($requestIxFr)
 {
     GenericHelper::checkIfZoneIsSlaveAndThrowExceptionIfNot($this->_type);
     $this->_requestIxFr = GenericHelper::checkIfObjectIsInstanceOfYesNoThrowExceptionOtherWise($requestIxFr);
     return $this;
 }