public function __construct(callable $traversableFactory = null) { $this->storage = new \SplObjectStorage(); $this->traversableFactory = $traversableFactory ?: Traversable::factory(); }