for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Phossa Project
*
* PHP version 5.4
* @category Library
* @package Phossa2\Shared
* @copyright Copyright (c) 2016 phossa.com
* @license http://mit-license.org/ MIT License
* @link http://www.phossa.com/
*/
/*# declare(strict_types=1); */
namespace Phossa2\Shared\Extension;
use Phossa2\Shared\Base\ObjectAbstract;
* ExtensionAbstract
* @author Hong Zhang <[email protected]>
* @see ObjectAbstract
* @see ExtensionInterface
* @version 2.0.23
* @since 2.0.23 added
abstract class ExtensionAbstract extends ObjectAbstract implements ExtensionInterface
{
* The server object
* @var ExtensionAwareInterface
* @access protected
protected $server;
* The lazy boot flag
* @var bool
protected $booted = false;
* {@inheritDoc}
public function methodsAvailable()/*# : array */
return [];
}
public function boot(ExtensionAwareInterface $server)
if (!$this->booted) {
// bind server
$this->server = $server;
// call user defined boot
$this->bootExtension();
// call your own bootMethod here
$this->booted = true;
* The real boot method
abstract protected function bootExtension();