Copied!

Hooks collection, aggregated by repository.

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

Fetches content of a hook.

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

Tests if repository has a given hook.

  • param string $name Name of the hook
  • return bool
public remove ( $name )
 

Removes a hook from repository.

  • param string $name Name of the hook
  • throws LogicException The hook is not present
public set ( $name , $content )
 

Set a hook in repository.

  • param string $name Name of the hook
  • param string $content Content of the hook
  • throws LogicException The hook is already defined
public setSymlink ( $name , $file )
 

Insert a hook in repository using a symlink.

  • param string $name Name of the hook to insert
  • param string $file Target of symlink
  • throws LogicException Hook is already present
  • throws RuntimeException Error on symlink creation
Properties
protected $repository
Methods
protected getPath ( $name )
 
  • return string
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration