HookContentRenderer

Class
Final: Yes

Renders packaged Git hooks with runtime-specific DevTools hook configuration paths.

Table of Contents

Constants

MANAGED_GRUMPHP_CONFIG_PLACEHOLDER

Placeholder replaced with the packaged GrumPHP config path rendered relative to the project when possible.

 = '__DEV_TOOLS_GRUMPHP_CONFIG__'

Methods

render()

Renders the hook contents for the active DevTools runtime.

 : string
Constants

Constants

MANAGED_GRUMPHP_CONFIG_PLACEHOLDER

Public

Placeholder replaced with the packaged GrumPHP config path rendered relative to the project when possible.

public mixed MANAGED_GRUMPHP_CONFIG_PLACEHOLDER = '__DEV_TOOLS_GRUMPHP_CONFIG__'
Methods

render()

Public

Renders the hook contents for the active DevTools runtime.

public render( string  $contents[, string  $projectPath = '']) : string
Parameters
$contents : string

Description

the packaged hook contents

$projectPath : string = ''

Description

the consumer project root that will own the synchronized hook

Return values
string

Description

the rendered hook contents