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

setType() public method

public setType ( string $type ) : ValueGenerator
$type string
return ValueGenerator
    public function setType($type)
    {
        $this->type = (string) $type;
        return $this;
    }

Usage Example

コード例 #1
0
 /**
  * Export the $config array in a human readable format
  *
  * @param  array $config
  * @param  int $indent 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->setType(static::$useShortArrayNotation ? ValueGenerator::TYPE_ARRAY_SHORT : ValueGenerator::TYPE_ARRAY_LONG);
     static::$valueGenerator->setArrayDepth($indent);
     return static::$valueGenerator;
 }
All Usage Examples Of Zend\Code\Generator\ValueGenerator::setType