public function __construct($name, Property $childType = null) { $this->childProperty = $childType; parent::__construct($name); // Must be traversable $this->addRequirement(new IsType(IsType::TYPE_ARRAY)); }
public function __construct(Model $model, $name = null) { $this->model = $model; if (!isset($name)) { $name = $model->getName(); } parent::__construct($name); }