Webiny\Component\Config\Bridge\Yaml\YamlInterface::getString PHP Method

getString() public method

Get current Yaml value as string
public getString ( integer $indent = 4 ) : string
$indent integer
return string
    public function getString($indent = 4);

Usage Example

Exemplo n.º 1
0
 /**
  * Get current Yaml value as string
  *
  * @param int  $indent
  * @param bool $wordWrap
  *
  * @throws YamlException
  * @return string
  */
 public function getString($indent = 2, $wordWrap = false)
 {
     $res = $this->driverInstance->getString($indent, $wordWrap);
     if (!$this->isString($res) && !$this->isStringObject($res)) {
         throw new YamlException('YamlInterface method _getString() must return a string or StringObject.');
     }
     return StdObjectWrapper::toString($res);
 }