PHP Class Bart\GitHook\GitHookController

Show file Open project: box/bart Class Usage Examples

Public Methods

Method Description
__toString ( ) : string
createFromScriptName ( string $invokedScript ) : GitHookController
hookName ( ) : string
projectName ( ) : string
run ( ) Process STDIN and verify all revisions

Private Methods

Method Description
__construct ( string $gitDir, string $projectName, string $hookName )
createHookRunner ( Commit $commit ) : Bart\GitHook\GitHookRunner Instantiate hook runner for hook type
processRevisions ( ) Run each revision against current hook
shouldSkip ( Commit $commit, GitHookConfig $gitHookConfig ) : boolean

Method Details

__toString() public method

public __toString ( ) : string
return string A human readable respresentation of this instance

createFromScriptName() public static method

public static createFromScriptName ( string $invokedScript ) : GitHookController
$invokedScript string PHP SCRIPT_NAME e.g. hooks/post-recieve.d/bart-hook-runner
return GitHookController

hookName() public method

public hookName ( ) : string
return string The parsed name of the running hook context

projectName() public method

public projectName ( ) : string
return string The parsed name of the current project

run() public method

Process STDIN and verify all revisions
public run ( )