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
15 * Locate files containing PHP classes, interfaces, abstracts or traits
17 class PhpClassFile
extends SplFileInfo
22 protected $classes = array();
27 protected $namespaces = array();
34 public function getClasses()
36 return $this->classes
;
44 public function getNamespaces()
46 return $this->namespaces
;
52 * @param string $class
55 public function addClass($class)
57 $this->classes
[] = $class;
64 * @param string $namespace
67 public function addNamespace($namespace)
69 if (in_array($namespace, $this->namespaces
)) {
72 $this->namespaces
[] = $namespace;