locating files in a directory for classes only with ZF2

Code
<?php

use Zend\File\ClassFileLocator;

$dir 'zendframework/library/Zend/File';

$locator = new ClassFileLocator($dir);

foreach (
$locator as $classFile) {
    echo 
$classFile->getFileName() . PHP_EOL;
}
Result
ClassFileLocator.php
PhpClassFile.php
ExceptionInterface.php
InvalidArgumentException.php
RuntimeException.php
BadMethodCallException.php
Transfer.php
ExceptionInterface.php
InvalidArgumentException.php
PhpEnvironmentException.php
RuntimeException.php
BadMethodCallException.php
FilterPluginManager.php
Http.php
ValidatorPluginManager.php
AbstractAdapter.php
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6