1. Go to this page and download the library: Download php-composter/php-composter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php-composter / php-composter example snippets
namespace PHPComposter\PHPComposterExample;
use PHPComposter\PHPComposter\BaseAction;
class Example extends BaseAction
{
// [...]
}
// [...]
class Example extends BaseAction
{
/**
* Example pre-commit action method.
*
* @var string $hook Name of the hook that was triggered.
* @var string $root Root folder in which the hook was triggered.
*/
public function preCommit()
{
echo 'Example Pre-Commit Hook ' . $this->hook . ' @ ' . $this->root . PHP_EOL;
}
}