PHP 클래스 PDepend\Engine

The PDepend is a php port/adaption of the Java class file analyzer JDepend.
파일 보기 프로젝트 열기: pdepend/pdepend 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$configuration PDepend\Util\Configuration The system configuration.

공개 메소드들

메소드 설명
__construct ( PDepend\Util\Configuration $configuration, PDepend\Util\Cache\CacheFactory $cacheFactory, PDepend\Metrics\AnalyzerFactory $analyzerFactory ) Constructs a new php depend facade.
addDirectory ( string $directory ) : void Adds the specified directory to the list of directories to be analyzed.
addFile ( string $file ) : void Adds a single source code file to the list of files to be analysed.
addFileFilter ( PDepend\Input\Filter $filter ) : void Adds a new input/file filter.
addProcessListener ( pdepend\ProcessListener $listener ) : void Adds a process listener.
addReportGenerator ( PDepend\Report\ReportGenerator $generator ) : void Adds a logger to the output list.
analyze ( ) : PDepend\Source\AST\ASTNamespace[] Analyzes the registered directories and returns the collection of analyzed namespace.
countClasses ( ) : integer Returns the number of analyzed php classes and interfaces.
countNamespaces ( ) : integer Returns the number of analyzed namespaces.
getExceptions ( ) : PDepend\Source\Parser\ParserException[] Returns an array with all {@link \PDepend\Source\Parser\ParserException} that were caught during the parsing process.
getNamespace ( string $name ) : PDepend\Source\AST\ASTNamespace Returns the analyzed namespace for the given name.
getNamespaces ( ) : PDepend\Source\AST\ASTNamespace[] Returns an array with the analyzed namespace.
setCodeFilter ( PDepend\Source\AST\ASTArtifactList\ArtifactFilter $filter ) : void Sets an additional code filter. These filters could be used to hide external libraries and global stuff from the PDepend output.
setOptions ( array $options = [] ) : void Sets analyzer options.
setWithoutAnnotations ( ) : void Should the parse ignore doc comment annotations?

보호된 메소드들

메소드 설명
fireEndAnalyzeProcess ( ) : void Sends the end analyzing process event.
fireEndFileParsing ( PDepend\Source\Tokenizer\Tokenizer $tokenizer ) : void Sends the end file parsing event.
fireEndLogProcess ( ) : void Sends the end log process event.
fireEndParseProcess ( PDepend\Source\Builder\Builder $builder ) : void Send the end parsing process event.
fireStartAnalyzeProcess ( ) : void Sends the start analyzing process event.
fireStartFileParsing ( PDepend\Source\Tokenizer\Tokenizer $tokenizer ) : void Sends the start file parsing event.
fireStartLogProcess ( ) : void Sends the start log process event.
fireStartParseProcess ( PDepend\Source\Builder\Builder $builder ) : void Send the start parsing process event.

비공개 메소드들

메소드 설명
createAnalyzers ( $options )
createFileIterator ( ) : Iterator This method will create an iterator instance which contains all files that are part of the parsing process.
performAnalyzeProcess ( ) : void This method performs the analysing process of the parsed source files. It creates the required analyzers for the registered listeners and then applies them to the source tree.
performParseProcess ( ) : void This method performs the parsing process of all source files. It expects that the $_builder property was initialized with a concrete builder implementation.

메소드 상세

__construct() 공개 메소드

Constructs a new php depend facade.
public __construct ( PDepend\Util\Configuration $configuration, PDepend\Util\Cache\CacheFactory $cacheFactory, PDepend\Metrics\AnalyzerFactory $analyzerFactory )
$configuration PDepend\Util\Configuration The system configuration.
$cacheFactory PDepend\Util\Cache\CacheFactory
$analyzerFactory PDepend\Metrics\AnalyzerFactory

addDirectory() 공개 메소드

Adds the specified directory to the list of directories to be analyzed.
public addDirectory ( string $directory ) : void
$directory string The php source directory.
리턴 void

addFile() 공개 메소드

Adds a single source code file to the list of files to be analysed.
public addFile ( string $file ) : void
$file string The source file name.
리턴 void

addFileFilter() 공개 메소드

Adds a new input/file filter.
public addFileFilter ( PDepend\Input\Filter $filter ) : void
$filter PDepend\Input\Filter New input/file filter instance.
리턴 void

addProcessListener() 공개 메소드

Adds a process listener.
public addProcessListener ( pdepend\ProcessListener $listener ) : void
$listener pdepend\ProcessListener The listener instance.
리턴 void

addReportGenerator() 공개 메소드

Adds a logger to the output list.
public addReportGenerator ( PDepend\Report\ReportGenerator $generator ) : void
$generator PDepend\Report\ReportGenerator The logger instance.
리턴 void

analyze() 공개 메소드

Analyzes the registered directories and returns the collection of analyzed namespace.
public analyze ( ) : PDepend\Source\AST\ASTNamespace[]
리턴 PDepend\Source\AST\ASTNamespace[]

countClasses() 공개 메소드

Returns the number of analyzed php classes and interfaces.
public countClasses ( ) : integer
리턴 integer

countNamespaces() 공개 메소드

Returns the number of analyzed namespaces.
public countNamespaces ( ) : integer
리턴 integer

fireEndAnalyzeProcess() 보호된 메소드

Sends the end analyzing process event.
protected fireEndAnalyzeProcess ( ) : void
리턴 void

fireEndFileParsing() 보호된 메소드

Sends the end file parsing event.
protected fireEndFileParsing ( PDepend\Source\Tokenizer\Tokenizer $tokenizer ) : void
$tokenizer PDepend\Source\Tokenizer\Tokenizer
리턴 void

fireEndLogProcess() 보호된 메소드

Sends the end log process event.
protected fireEndLogProcess ( ) : void
리턴 void

fireEndParseProcess() 보호된 메소드

Send the end parsing process event.
protected fireEndParseProcess ( PDepend\Source\Builder\Builder $builder ) : void
$builder PDepend\Source\Builder\Builder The used node builder instance.
리턴 void

fireStartAnalyzeProcess() 보호된 메소드

Sends the start analyzing process event.
protected fireStartAnalyzeProcess ( ) : void
리턴 void

fireStartFileParsing() 보호된 메소드

Sends the start file parsing event.
protected fireStartFileParsing ( PDepend\Source\Tokenizer\Tokenizer $tokenizer ) : void
$tokenizer PDepend\Source\Tokenizer\Tokenizer
리턴 void

fireStartLogProcess() 보호된 메소드

Sends the start log process event.
protected fireStartLogProcess ( ) : void
리턴 void

fireStartParseProcess() 보호된 메소드

Send the start parsing process event.
protected fireStartParseProcess ( PDepend\Source\Builder\Builder $builder ) : void
$builder PDepend\Source\Builder\Builder The used node builder instance.
리턴 void

getExceptions() 공개 메소드

Returns an array with all {@link \PDepend\Source\Parser\ParserException} that were caught during the parsing process.
public getExceptions ( ) : PDepend\Source\Parser\ParserException[]
리턴 PDepend\Source\Parser\ParserException[]

getNamespace() 공개 메소드

Returns the analyzed namespace for the given name.
public getNamespace ( string $name ) : PDepend\Source\AST\ASTNamespace
$name string
리턴 PDepend\Source\AST\ASTNamespace

getNamespaces() 공개 메소드

Returns an array with the analyzed namespace.
public getNamespaces ( ) : PDepend\Source\AST\ASTNamespace[]
리턴 PDepend\Source\AST\ASTNamespace[]

setCodeFilter() 공개 메소드

Sets an additional code filter. These filters could be used to hide external libraries and global stuff from the PDepend output.
public setCodeFilter ( PDepend\Source\AST\ASTArtifactList\ArtifactFilter $filter ) : void
$filter PDepend\Source\AST\ASTArtifactList\ArtifactFilter
리턴 void

setOptions() 공개 메소드

Sets analyzer options.
public setOptions ( array $options = [] ) : void
$options array
리턴 void

setWithoutAnnotations() 공개 메소드

Should the parse ignore doc comment annotations?
public setWithoutAnnotations ( ) : void
리턴 void

프로퍼티 상세

$configuration 보호되어 있는 프로퍼티

The system configuration.
부터: 0.10.0
protected Configuration,PDepend\Util $configuration
리턴 PDepend\Util\Configuration