/** * @Clips\TestValue(json="tree.json") */ public function testIterateDepth() { $node = new SimpleTreeNode($this->value); $iter = $node->iterator('depth'); $i = 0; foreach ($iter as $k => $v) { echo $k . " = [" . $v->label . "]\n"; } }
public function __construct($data = array()) { if (is_object($data)) { $data = (array) $data; } if (!isset($data['type'])) { $this->type = Action::SERVER; } parent::__construct($data); }