Zend\Code\Generator\ValueGenerator::setArrayDepth PHP Method

setArrayDepth() public method

public setArrayDepth ( integer $arrayDepth ) : ValueGenerator
$arrayDepth integer
return ValueGenerator
    public function setArrayDepth($arrayDepth)
    {
        $this->arrayDepth = (int) $arrayDepth;
        return $this;
    }

Usage Example

 /**
  * Export the $config array in a human readable format
  *
  * @param  array $config
  * @param  integer $space the initial indentation value
  * @return string
  */
 public static function exportConfig($config, $indent = 0)
 {
     if (empty(static::$valueGenerator)) {
         static::$valueGenerator = new ValueGenerator();
     }
     static::$valueGenerator->setValue($config);
     static::$valueGenerator->setArrayDepth($indent);
     return static::$valueGenerator;
 }
All Usage Examples Of Zend\Code\Generator\ValueGenerator::setArrayDepth