for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Generator.php - Code generator interface
*
* Any class generating css or js code must implement this interface.
* @package jaxon-core
* @author Thierry Feuzeu <[email protected]>
* @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
* @link https://github.com/jaxon-php/jaxon-core
*/
namespace Jaxon\Plugin;
abstract class Package implements Code\Contracts\Generator
{
* The configuration options of the package
* @var array
protected $aOptions = [];
* Whether to include the getReadyScript() in the generated code.
* @var boolean
protected $bReadyEnabled = false;
* Get package options.
* @return array
public function getOptions()
return $this->aOptions;
}
* Get the view renderer
* @return \Jaxon\Utils\View\Renderer
public function view()
return jaxon()->view();
* Get the path to the config file
* @return string
abstract public static function getConfigFile();
* Include the getReadyScript() in the generated code.
* @return void
public function ready()
$this->bReadyEnabled = true;
* @inheritDoc
public function readyEnabled()
return $this->bReadyEnabled;
public final function getHash()
// Packages do not generate hash on their own. So we make this method final.
return '';
public function getCss()
public function getJs()
public final function getScript()
// Packages do not generate script. So we make this method final.
* Get the HTML code of the package home page
abstract public function getHtml();