Hooks collection, aggregated by repository.

Cloneable Instantiable
public __construct ( Gitonomy\Git\Repository $repository )
public get ( $name )

Fetches content of a hook.

  • throws InvalidArgumentException Hook does not exist
  • return string Content of the hook
public has ( $name )

Tests if repository has a given hook.

  • return bool
public remove ( $name )

Removes a hook from repository.

  • throws LogicException The hook is not present
public set ( $name , $content )

Set a hook in repository.

  • throws LogicException The hook is already defined
public setSymlink ( $name , $file )

Insert a hook in repository using a symlink.

  • throws LogicException Hook is already present
  • throws RuntimeException Error on symlink creation
protected $repository
protected getPath ( $name )
© 2021 Bruce Wells
Search Namespaces \ Classes