3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Code\Scanner
;
12 use Zend\Code\Annotation\AnnotationManager
;
13 use Zend\Code\Exception
;
15 class FileScanner
extends TokenArrayScanner
implements ScannerInterface
20 protected $file = null;
24 * @param null|AnnotationManager $annotationManager
25 * @throws Exception\InvalidArgumentException
27 public function __construct($file, AnnotationManager
$annotationManager = null)
30 if (!file_exists($file)) {
31 throw new Exception\
InvalidArgumentException(sprintf(
32 'File "%s" not found',
36 parent
::__construct(token_get_all(file_get_contents($file)), $annotationManager);
42 public function getFile()