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

        $path = $this->getPath($name);
        file_put_contents($path, $content);
        chmod($path, 0777);
    }
public function set($name, $content)
    {
        if ($this->has($name)) {
            throw new LogicException(sprintf('A hook "%s" is already defined', $name));
        }

        $path = $this->getPath($name);
        file_put_contents($path, $content);
        chmod($path, 0777);
    }
public function set ( $ name , $ content ) { if ( $ this -> has ( $ name ) ) { throw new LogicException ( sprintf ( 'A hook "%s" is already defined' , $ name ) ) ; } $ path = $ this -> getPath ( $ name ) ; file_put_contents ( $ path , $ content ) ; chmod ( $ path , 0777 ) ; }
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
Set a hook in repository .