private function createMap()
    {
        $map = [];
        //browse directories recursively
        $directoryIterator = new \RecursiveDirectoryIterator($this->inputDirectory);
        $iterator = new \RecursiveIteratorIterator($directoryIterator);
        foreach ($iterator as $file) {
            if ($file->getFileName() == '.' || $file->getFileName() == '..') {
                continue;
            }
            if (!preg_match($this->modelClassPattern, $file->getPathname())) {
                continue;
            }
            //resolves name of class
            $className = $this->resolveFileClassName($file);
            try {
                $classInstance = $this->instantiateClass($className);
                if ($classInstance instanceof \Phalcon\Mvc\Collection) {
                    $map[$classInstance->getSource()] = $className;
                }
            } catch (\Exception $e) {
                continue;
            }
        }

        return $map;
    }