PHP Class Naneau\Obfuscator\Obfuscator

Obfuscates a directory of files
Datei anzeigen Open project: naneau/php-obfuscator

Public Methods

Method Description
getEventDispatcher ( ) : EventDispatcher Get the event dispatcher
getFileRegex ( ) : string Get the regex for file inclusion
getParser ( ) : PhpParser\Parser Get the parser
getPrettyPrinter ( ) : Standard Get the "pretty" printer
getTraverser ( ) : PhpParser\NodeTraverserInterface Get the node traverser
obfuscate ( string $directory, boolean $stripWhitespace = false, $ignoreError = false ) : void Strip whitespace
setEventDispatcher ( EventDispatcher $eventDispatcher ) : Obfuscator Set the event dispatcher
setFileRegex ( string $fileRegex ) : Obfuscator Set the regex for file inclusion
setParser ( PhpParser\Parser $parser ) : Obfuscator Set the parser
setPrettyPrinter ( Standard $prettyPrinter ) : Obfuscator Set the "pretty" printer
setTraverser ( PhpParser\NodeTraverserInterface $traverser ) : Obfuscator Set the node traverser

Private Methods

Method Description
getFiles ( $directory ) : SplFileInfo Get the file list
obfuscateFileContents ( string $file, boolean $ignoreError ) : string Obfuscate a single file's contents

Method Details

getEventDispatcher() public method

Get the event dispatcher
public getEventDispatcher ( ) : EventDispatcher
return Symfony\Component\EventDispatcher\EventDispatcher

getFileRegex() public method

Get the regex for file inclusion
public getFileRegex ( ) : string
return string

getParser() public method

Get the parser
public getParser ( ) : PhpParser\Parser
return PhpParser\Parser

getPrettyPrinter() public method

Get the "pretty" printer
public getPrettyPrinter ( ) : Standard
return PhpParser\PrettyPrinter\Standard

getTraverser() public method

Get the node traverser
public getTraverser ( ) : PhpParser\NodeTraverserInterface
return PhpParser\NodeTraverserInterface

obfuscate() public method

Strip whitespace
public obfuscate ( string $directory, boolean $stripWhitespace = false, $ignoreError = false ) : void
$directory string
$stripWhitespace boolean
return void

setEventDispatcher() public method

Set the event dispatcher
public setEventDispatcher ( EventDispatcher $eventDispatcher ) : Obfuscator
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcher
return Obfuscator

setFileRegex() public method

Set the regex for file inclusion
public setFileRegex ( string $fileRegex ) : Obfuscator
$fileRegex string
return Obfuscator

setParser() public method

Set the parser
public setParser ( PhpParser\Parser $parser ) : Obfuscator
$parser PhpParser\Parser
return Obfuscator

setPrettyPrinter() public method

Set the "pretty" printer
public setPrettyPrinter ( Standard $prettyPrinter ) : Obfuscator
$prettyPrinter PhpParser\PrettyPrinter\Standard
return Obfuscator

setTraverser() public method

Set the node traverser
public setTraverser ( PhpParser\NodeTraverserInterface $traverser ) : Obfuscator
$traverser PhpParser\NodeTraverserInterface
return Obfuscator