setMaxDepth() публичный Метод

If the depth is exceeded during encoding, an {@link EncodingFailedException} will be thrown. A depth of zero means that objects are not allowed. A depth of one means only one level of objects or arrays is allowed.
public setMaxDepth ( integer $maxDepth )
$maxDepth integer The maximum recursion depth
Пример #1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testMaxDepthMustBeOneOrGreater()
 {
     $this->encoder->setMaxDepth(0);
 }