src/phpDocumentor/Parser/File.php
public function parse($filename, ProjectDescriptorBuilder $builder)
    {
        if (class_exists('phpDocumentor\Event\Dispatcher')) {
            Dispatcher::getInstance()->dispatch(
                'parser.file.pre',
                PreFileEvent::createInstance($this)->setFile($filename)
            );
        }
        $this->log('Starting to parse file: ' . $filename);

        try {
            $file = $this->createFileReflector($builder, $filename);
            if (!$file) {
                $this->log('>> Skipped file ' . $filename . ' as no modifications were detected');
                return;
            }

            $file->process();
            $builder->buildFileUsingSourceData($file);
            $this->logErrorsForDescriptor($builder->getProjectDescriptor()->getFiles()->get($file->getFilename()));
        } catch (Exception $e) {
            $this->log(
                '  Unable to parse file "' . $filename . '", an error was detected: ' . $e->getMessage(),
                LogLevel::ALERT
            );
        }
    }
public function parse($filename, ProjectDescriptorBuilder $builder)
    {
        if (class_exists('phpDocumentor\Event\Dispatcher')) {
            Dispatcher::getInstance()->dispatch(
                'parser.file.pre',
                PreFileEvent::createInstance($this)->setFile($filename)
            );
        }
        $this->log('Starting to parse file: ' . $filename);

        try {
            $file = $this->createFileReflector($builder, $filename);
            if (!$file) {
                $this->log('>> Skipped file ' . $filename . ' as no modifications were detected');
                return;
            }

            $file->process();
            $builder->buildFileUsingSourceData($file);
            $this->logErrorsForDescriptor($builder->getProjectDescriptor()->getFiles()->get($file->getFilename()));
        } catch (Exception $e) {
            $this->log(
                '  Unable to parse file "' . $filename . '", an error was detected: ' . $e->getMessage(),
                LogLevel::ALERT
            );
        }
    }
public function parse ( $ filename , ProjectDescriptorBuilder $ builder ) { if ( class_exists ( 'phpDocumentor\Event\Dispatcher' ) ) { Dispatcher :: getInstance ( ) -> dispatch ( 'parser.file.pre' , PreFileEvent :: createInstance ( $ this ) -> setFile ( $ filename ) ) ; } $ this -> log ( 'Starting to parse file: ' . $ filename ) ; try { $ file = $ this -> createFileReflector ( $ builder , $ filename ) ; if ( ! $ file ) { $ this -> log ( '>> Skipped file ' . $ filename . ' as no modifications were detected' ) ; return ; } $ file -> process ( ) ; $ builder -> buildFileUsingSourceData ( $ file ) ; $ this -> logErrorsForDescriptor ( $ builder -> getProjectDescriptor ( ) -> getFiles ( ) -> get ( $ file -> getFilename ( ) ) ) ; } catch ( Exception $ e ) { $ this -> log ( '  Unable to parse file "' . $ filename . '", an error was detected: ' . $ e -> getMessage ( ) , LogLevel :: ALERT ) ; } }
Parses the file identified by the given filename and passes the resulting FileDescriptor to the ProjectBuilder.

@param string                   $filename
@param ProjectDescriptorBuilder $builder

@return void
Parses the file identified by the given filename and passes the resulting FileDescriptor to the ProjectBuilder .