public function setSymlink($name, $file)
    {
        if ($this->has($name)) {
            throw new LogicException(sprintf('A hook "%s" is already defined', $name));
        }

        $path = $this->getPath($name);
        if (false === symlink($file, $path)) {
            throw new RuntimeException(sprintf('Unable to create hook "%s"', $name, $path));
        }
    }
public function setSymlink($name, $file)
    {
        if ($this->has($name)) {
            throw new LogicException(sprintf('A hook "%s" is already defined', $name));
        }

        $path = $this->getPath($name);
        if (false === symlink($file, $path)) {
            throw new RuntimeException(sprintf('Unable to create hook "%s"', $name, $path));
        }
    }
public function setSymlink ( $ name , $ file ) { if ( $ this -> has ( $ name ) ) { throw new LogicException ( sprintf ( 'A hook "%s" is already defined' , $ name ) ) ; } $ path = $ this -> getPath ( $ name ) ; if ( false === symlink ( $ file , $ path ) ) { throw new RuntimeException ( sprintf ( 'Unable to create hook "%s"' , $ name , $ path ) ) ; } }
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
Insert a hook in repository using a symlink .