src/ActiveDoctrine/Schema/SchemaCreator.php
public function addEntityDirectory($namespace, $directory)
    {
        if (!is_dir($directory)) {
            return;
        }
        $files = new \DirectoryIterator($directory);

        foreach ($files as $file) {
            if ($file->isDir() && !$file->isDot()) {
                $this->addEntityDirectory($namespace.'\\'.basename($file->getPathname()) , $file->getPathname());
                continue;
            }

            if (!$file->isFile()) {
                continue;
            }

            $class = $namespace.'\\'.$file->getBasename('.php');
            $r = new \ReflectionClass($class);
            if ($r->isSubclassOf('ActiveDoctrine\Entity\Entity') && !$r->isAbstract()) {
                $this->addEntityClass($class);
            }
        }
    }
public function addEntityDirectory($namespace, $directory)
    {
        if (!is_dir($directory)) {
            return;
        }
        $files = new \DirectoryIterator($directory);

        foreach ($files as $file) {
            if ($file->isDir() && !$file->isDot()) {
                $this->addEntityDirectory($namespace.'\\'.basename($file->getPathname()) , $file->getPathname());
                continue;
            }

            if (!$file->isFile()) {
                continue;
            }

            $class = $namespace.'\\'.$file->getBasename('.php');
            $r = new \ReflectionClass($class);
            if ($r->isSubclassOf('ActiveDoctrine\Entity\Entity') && !$r->isAbstract()) {
                $this->addEntityClass($class);
            }
        }
    }
public function addEntityDirectory ( $ namespace , $ directory ) { if ( ! is_dir ( $ directory ) ) { return ; } $ files = new \ DirectoryIterator ( $ directory ) ; foreach ( $ files as $ file ) { if ( $ file -> isDir ( ) && ! $ file -> isDot ( ) ) { $ this -> addEntityDirectory ( $ namespace . '\\' . basename ( $ file -> getPathname ( ) ) , $ file -> getPathname ( ) ) ; continue ; } if ( ! $ file -> isFile ( ) ) { continue ; } $ class = $ namespace . '\\' . $ file -> getBasename ( '.php' ) ; $ r = new \ ReflectionClass ( $ class ) ; if ( $ r -> isSubclassOf ( 'ActiveDoctrine\Entity\Entity' ) && ! $ r -> isAbstract ( ) ) { $ this -> addEntityClass ( $ class ) ; } } }
Add all entity classes in a directory.

@param string $namespace The base namespace of the entities
@param string $directory The directory
Add all entity classes in a directory .