| 1 | <?php  | 
            ||
| 16 | abstract class Package implements Code\Contracts\Generator  | 
            ||
| 17 | { | 
            ||
| 18 | /**  | 
            ||
| 19 | * The configuration options of the package  | 
            ||
| 20 | *  | 
            ||
| 21 | * @var array  | 
            ||
| 22 | */  | 
            ||
| 23 | protected $aOptions = [];  | 
            ||
| 24 | |||
| 25 | /**  | 
            ||
| 26 | * Whether to include the getReadyScript() in the generated code.  | 
            ||
| 27 | *  | 
            ||
| 28 | * @var boolean  | 
            ||
| 29 | */  | 
            ||
| 30 | protected $bReadyEnabled = false;  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * Get package options.  | 
            ||
| 34 | *  | 
            ||
| 35 | * @return array  | 
            ||
| 36 | */  | 
            ||
| 37 | public function getOptions()  | 
            ||
| 41 | |||
| 42 | /**  | 
            ||
| 43 | * Get the view renderer  | 
            ||
| 44 | *  | 
            ||
| 45 | * @return \Jaxon\Utils\View\Renderer  | 
            ||
| 46 | */  | 
            ||
| 47 | public function view()  | 
            ||
| 51 | |||
| 52 | /**  | 
            ||
| 53 | * Get the path to the config file  | 
            ||
| 54 | *  | 
            ||
| 55 | * @return string  | 
            ||
| 56 | */  | 
            ||
| 57 | abstract public static function getConfigFile();  | 
            ||
| 58 | |||
| 59 | /**  | 
            ||
| 60 | * Include the getReadyScript() in the generated code.  | 
            ||
| 61 | *  | 
            ||
| 62 | * @return void  | 
            ||
| 63 | */  | 
            ||
| 64 | public function ready()  | 
            ||
| 68 | |||
| 69 | /**  | 
            ||
| 70 | * @inheritDoc  | 
            ||
| 71 | */  | 
            ||
| 72 | public function readyEnabled()  | 
            ||
| 76 | |||
| 77 | /**  | 
            ||
| 78 | * @inheritDoc  | 
            ||
| 79 | */  | 
            ||
| 80 | public final function getHash()  | 
            ||
| 85 | |||
| 86 | /**  | 
            ||
| 87 | * @inheritDoc  | 
            ||
| 88 | */  | 
            ||
| 89 | public function getCss()  | 
            ||
| 93 | |||
| 94 | /**  | 
            ||
| 95 | * @inheritDoc  | 
            ||
| 96 | */  | 
            ||
| 97 | public function getJs()  | 
            ||
| 101 | |||
| 102 | /**  | 
            ||
| 103 | * @inheritDoc  | 
            ||
| 104 | */  | 
            ||
| 105 | public final function getScript()  | 
            ||
| 110 | |||
| 111 | /**  | 
            ||
| 112 | * Get the HTML code of the package home page  | 
            ||
| 113 | *  | 
            ||
| 114 | * @return string  | 
            ||
| 115 | */  | 
            ||
| 116 | abstract public function getHtml();  | 
            ||
| 117 | }  | 
            ||
| 118 |