Generator is an internal class in PHP 5.5