Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Code / Scanner / FileScanner.php
blob0c435e30e98d6b71a57fe2c53949b1485b41476a
1 <?php
2 /**
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
8 */
10 namespace Zend\Code\Scanner;
12 use Zend\Code\Annotation\AnnotationManager;
13 use Zend\Code\Exception;
15 class FileScanner extends TokenArrayScanner implements ScannerInterface
17 /**
18 * @var string
20 protected $file = null;
22 /**
23 * @param string $file
24 * @param null|AnnotationManager $annotationManager
25 * @throws Exception\InvalidArgumentException
27 public function __construct($file, AnnotationManager $annotationManager = null)
29 $this->file = $file;
30 if (!file_exists($file)) {
31 throw new Exception\InvalidArgumentException(sprintf(
32 'File "%s" not found',
33 $file
34 ));
36 parent::__construct(token_get_all(file_get_contents($file)), $annotationManager);
39 /**
40 * @return null|string
42 public function getFile()
44 return $this->file;