@@ -27,64 +27,64 @@ |
||
| 27 | 27 | |
| 28 | 28 | abstract class HookAnnotation extends AbstractAnnotation |
| 29 | 29 | { |
| 30 | - /** |
|
| 30 | +/** |
|
| 31 | 31 | * @var string |
| 32 | 32 | */ |
| 33 | - protected $sMethod = ''; |
|
| 33 | +protected $sMethod = ''; |
|
| 34 | 34 | |
| 35 | - /** |
|
| 35 | +/** |
|
| 36 | 36 | * @var array |
| 37 | 37 | */ |
| 38 | - protected $aParams = []; |
|
| 38 | +protected $aParams = []; |
|
| 39 | 39 | |
| 40 | - /** |
|
| 40 | +/** |
|
| 41 | 41 | * |
| 42 | 42 | */ |
| 43 | - abstract protected static function getType(): string; |
|
| 43 | +abstract protected static function getType(): string; |
|
| 44 | 44 | |
| 45 | - /** |
|
| 45 | +/** |
|
| 46 | 46 | * @inheritDoc |
| 47 | 47 | */ |
| 48 | - public static function parseAnnotation($value) |
|
| 49 | - { |
|
| 50 | - $aParams = preg_split('/[\s]+/', $value, 2); |
|
| 51 | - if(count($aParams) === 1) |
|
| 52 | - { |
|
| 53 | - return ['call' => rtrim($aParams[0])]; |
|
| 54 | - } |
|
| 55 | - // The second parameter must be an array of callback parameter in json format. |
|
| 56 | - return ['call' => rtrim($aParams[0]), 'with' => json_decode($aParams[1], false)]; |
|
| 57 | - } |
|
| 48 | +public static function parseAnnotation($value) |
|
| 49 | +{ |
|
| 50 | +$aParams = preg_split('/[\s]+/', $value, 2); |
|
| 51 | +if(count($aParams) === 1) |
|
| 52 | +{ |
|
| 53 | +return ['call' => rtrim($aParams[0])]; |
|
| 54 | +} |
|
| 55 | +// The second parameter must be an array of callback parameter in json format. |
|
| 56 | +return ['call' => rtrim($aParams[0]), 'with' => json_decode($aParams[1], false)]; |
|
| 57 | +} |
|
| 58 | 58 | |
| 59 | - /** |
|
| 59 | +/** |
|
| 60 | 60 | * @inheritDoc |
| 61 | 61 | * @throws AnnotationException |
| 62 | 62 | */ |
| 63 | - public function initAnnotation(array $properties) |
|
| 64 | - { |
|
| 65 | - if(!isset($properties['call']) || !is_string($properties['call'])) |
|
| 66 | - { |
|
| 67 | - throw new AnnotationException('The @' . $this->getType() . |
|
| 68 | - ' annotation requires a property "call" of type string'); |
|
| 69 | - } |
|
| 70 | - foreach(array_keys($properties) as $propName) |
|
| 71 | - { |
|
| 72 | - if($propName !== 'call' && $propName !== 'with') |
|
| 73 | - { |
|
| 74 | - throw new AnnotationException('Unknown property "' . $propName . |
|
| 75 | - '" in the @' . $this->getType() . ' annotation'); |
|
| 76 | - } |
|
| 77 | - } |
|
| 78 | - // Cannot use isset here, because it will return false in case $properties['with'] === null |
|
| 79 | - if(array_key_exists('with', $properties)) |
|
| 80 | - { |
|
| 81 | - if(!is_array($properties['with'])) |
|
| 82 | - { |
|
| 83 | - throw new AnnotationException('The "with" property of the @' . |
|
| 84 | - $this->getType() . ' annotation must be of type array'); |
|
| 85 | - } |
|
| 86 | - $this->aParams = $properties['with']; |
|
| 87 | - } |
|
| 88 | - $this->sMethod = $properties['call']; |
|
| 89 | - } |
|
| 63 | +public function initAnnotation(array $properties) |
|
| 64 | +{ |
|
| 65 | +if(!isset($properties['call']) || !is_string($properties['call'])) |
|
| 66 | +{ |
|
| 67 | +throw new AnnotationException('The @' . $this->getType() . |
|
| 68 | + ' annotation requires a property "call" of type string'); |
|
| 69 | +} |
|
| 70 | +foreach(array_keys($properties) as $propName) |
|
| 71 | +{ |
|
| 72 | +if($propName !== 'call' && $propName !== 'with') |
|
| 73 | +{ |
|
| 74 | + throw new AnnotationException('Unknown property "' . $propName . |
|
| 75 | + '" in the @' . $this->getType() . ' annotation'); |
|
| 76 | +} |
|
| 77 | +} |
|
| 78 | +// Cannot use isset here, because it will return false in case $properties['with'] === null |
|
| 79 | +if(array_key_exists('with', $properties)) |
|
| 80 | +{ |
|
| 81 | +if(!is_array($properties['with'])) |
|
| 82 | +{ |
|
| 83 | + throw new AnnotationException('The "with" property of the @' . |
|
| 84 | + $this->getType() . ' annotation must be of type array'); |
|
| 85 | +} |
|
| 86 | +$this->aParams = $properties['with']; |
|
| 87 | +} |
|
| 88 | +$this->sMethod = $properties['call']; |
|
| 89 | +} |
|
| 90 | 90 | } |
@@ -30,16 +30,16 @@ |
||
| 30 | 30 | |
| 31 | 31 | abstract class AbstractRequestPlugin extends AbstractPlugin implements CallableRegistryInterface, RequestHandlerInterface |
| 32 | 32 | { |
| 33 | - /** |
|
| 33 | +/** |
|
| 34 | 34 | * @var Target |
| 35 | 35 | */ |
| 36 | - protected $xTarget = null; |
|
| 36 | +protected $xTarget = null; |
|
| 37 | 37 | |
| 38 | - /** |
|
| 38 | +/** |
|
| 39 | 39 | * @inheritDoc |
| 40 | 40 | */ |
| 41 | - public function getTarget(): ?Target |
|
| 42 | - { |
|
| 43 | - return $this->xTarget; |
|
| 44 | - } |
|
| 41 | +public function getTarget(): ?Target |
|
| 42 | +{ |
|
| 43 | +return $this->xTarget; |
|
| 44 | +} |
|
| 45 | 45 | } |
@@ -19,46 +19,46 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | abstract class AbstractPackage extends AbstractCodeGenerator |
| 21 | 21 | { |
| 22 | - /** |
|
| 22 | +/** |
|
| 23 | 23 | * The configuration options of the package |
| 24 | 24 | * |
| 25 | 25 | * @var Config |
| 26 | 26 | */ |
| 27 | - protected $xPkgConfig; |
|
| 27 | +protected $xPkgConfig; |
|
| 28 | 28 | |
| 29 | - /** |
|
| 29 | +/** |
|
| 30 | 30 | * The view renderer |
| 31 | 31 | * |
| 32 | 32 | * @var ViewRenderer |
| 33 | 33 | */ |
| 34 | - protected $xRenderer; |
|
| 34 | +protected $xRenderer; |
|
| 35 | 35 | |
| 36 | - /** |
|
| 36 | +/** |
|
| 37 | 37 | * Get the path to the config file, or the config options in an array. |
| 38 | 38 | * |
| 39 | 39 | * @return string|array |
| 40 | 40 | */ |
| 41 | - abstract public static function config(): string|array; |
|
| 41 | +abstract public static function config(): string|array; |
|
| 42 | 42 | |
| 43 | - /** |
|
| 43 | +/** |
|
| 44 | 44 | * Get the package config object |
| 45 | 45 | * |
| 46 | 46 | * @return Config |
| 47 | 47 | */ |
| 48 | - final public function getConfig(): Config |
|
| 49 | - { |
|
| 50 | - return $this->xPkgConfig; |
|
| 51 | - } |
|
| 48 | +final public function getConfig(): Config |
|
| 49 | +{ |
|
| 50 | +return $this->xPkgConfig; |
|
| 51 | +} |
|
| 52 | 52 | |
| 53 | - /** |
|
| 53 | +/** |
|
| 54 | 54 | * This method is automatically called after the package instance is created and configured. |
| 55 | 55 | * |
| 56 | 56 | * @return void |
| 57 | 57 | */ |
| 58 | - protected function init(): void |
|
| 59 | - {} |
|
| 58 | +protected function init(): void |
|
| 59 | +{} |
|
| 60 | 60 | |
| 61 | - /** |
|
| 61 | +/** |
|
| 62 | 62 | * Get the value of a given package option |
| 63 | 63 | * |
| 64 | 64 | * @param string $sOption The option name |
@@ -66,49 +66,49 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @return mixed |
| 68 | 68 | */ |
| 69 | - final public function getOption(string $sOption, $xDefault = null): mixed |
|
| 70 | - { |
|
| 71 | - return $this->xPkgConfig->getOption($sOption, $xDefault); |
|
| 72 | - } |
|
| 69 | +final public function getOption(string $sOption, $xDefault = null): mixed |
|
| 70 | +{ |
|
| 71 | +return $this->xPkgConfig->getOption($sOption, $xDefault); |
|
| 72 | +} |
|
| 73 | 73 | |
| 74 | - /** |
|
| 74 | +/** |
|
| 75 | 75 | * Get the view renderer |
| 76 | 76 | * |
| 77 | 77 | * @return ViewRenderer |
| 78 | 78 | */ |
| 79 | - final public function view(): ViewRenderer |
|
| 80 | - { |
|
| 81 | - return $this->xRenderer; |
|
| 82 | - } |
|
| 79 | +final public function view(): ViewRenderer |
|
| 80 | +{ |
|
| 81 | +return $this->xRenderer; |
|
| 82 | +} |
|
| 83 | 83 | |
| 84 | - /** |
|
| 84 | +/** |
|
| 85 | 85 | * @inheritDoc |
| 86 | 86 | */ |
| 87 | - final public function getHash(): string |
|
| 88 | - { |
|
| 89 | - // Packages do not generate hash on their own. So we make this method final. |
|
| 90 | - return ''; |
|
| 91 | - } |
|
| 87 | +final public function getHash(): string |
|
| 88 | +{ |
|
| 89 | +// Packages do not generate hash on their own. So we make this method final. |
|
| 90 | +return ''; |
|
| 91 | +} |
|
| 92 | 92 | |
| 93 | - /** |
|
| 93 | +/** |
|
| 94 | 94 | * Get the HTML code of the package home page |
| 95 | 95 | * |
| 96 | 96 | * @return string|Stringable |
| 97 | 97 | */ |
| 98 | - public function getHtml(): string|Stringable |
|
| 99 | - { |
|
| 100 | - return ''; |
|
| 101 | - } |
|
| 98 | +public function getHtml(): string|Stringable |
|
| 99 | +{ |
|
| 100 | +return ''; |
|
| 101 | +} |
|
| 102 | 102 | |
| 103 | - /** |
|
| 103 | +/** |
|
| 104 | 104 | * Get the HTML code of the package home page |
| 105 | 105 | * |
| 106 | 106 | * This method is an alias for getHtml(). |
| 107 | 107 | * |
| 108 | 108 | * @return string|Stringable |
| 109 | 109 | */ |
| 110 | - public function html(): string|Stringable |
|
| 111 | - { |
|
| 112 | - return $this->getHtml(); |
|
| 113 | - } |
|
| 110 | +public function html(): string|Stringable |
|
| 111 | +{ |
|
| 112 | +return $this->getHtml(); |
|
| 113 | +} |
|
| 114 | 114 | } |
@@ -7,21 +7,21 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | interface RequestHandlerInterface |
| 9 | 9 | { |
| 10 | - /** |
|
| 10 | +/** |
|
| 11 | 11 | * Get the target function or class and method |
| 12 | 12 | * |
| 13 | 13 | * @return Target|null |
| 14 | 14 | */ |
| 15 | - public function getTarget(): ?Target; |
|
| 15 | +public function getTarget(): ?Target; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 17 | +/** |
|
| 18 | 18 | * @param ServerRequestInterface $xRequest |
| 19 | 19 | * |
| 20 | 20 | * @return Target |
| 21 | 21 | */ |
| 22 | - public function setTarget(ServerRequestInterface $xRequest): Target; |
|
| 22 | +public function setTarget(ServerRequestInterface $xRequest): Target; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 24 | +/** |
|
| 25 | 25 | * Check if this plugin can process the current request |
| 26 | 26 | * |
| 27 | 27 | * Called by the <Jaxon\Plugin\RequestManager> when a request has been received to determine |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | * |
| 32 | 32 | * @return bool |
| 33 | 33 | */ |
| 34 | - public static function canProcessRequest(ServerRequestInterface $xRequest): bool; |
|
| 34 | +public static function canProcessRequest(ServerRequestInterface $xRequest): bool; |
|
| 35 | 35 | |
| 36 | - /** |
|
| 36 | +/** |
|
| 37 | 37 | * Process the current request |
| 38 | 38 | * |
| 39 | 39 | * Called by the <Jaxon\Plugin\RequestManager> when a request is being processed. |
@@ -42,5 +42,5 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return void |
| 44 | 44 | */ |
| 45 | - public function processRequest(): void; |
|
| 45 | +public function processRequest(): void; |
|
| 46 | 46 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | abstract class AbstractAnnotation extends Annotation implements IAnnotationParser |
| 22 | 22 | { |
| 23 | - /** |
|
| 23 | +/** |
|
| 24 | 24 | * Save the annotation value |
| 25 | 25 | * |
| 26 | 26 | * @param Metadata $xMetadata |
@@ -28,5 +28,5 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @return void |
| 30 | 30 | */ |
| 31 | - abstract public function saveValue(Metadata $xMetadata, string $sMethod = '*'): void; |
|
| 31 | +abstract public function saveValue(Metadata $xMetadata, string $sMethod = '*'): void; |
|
| 32 | 32 | } |
@@ -18,22 +18,22 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | class TemplateView implements ViewInterface |
| 20 | 20 | { |
| 21 | - /** |
|
| 21 | +/** |
|
| 22 | 22 | * The Jaxon template engine |
| 23 | 23 | * |
| 24 | 24 | * @var TemplateEngine |
| 25 | 25 | */ |
| 26 | - protected $xTemplateEngine; |
|
| 26 | +protected $xTemplateEngine; |
|
| 27 | 27 | |
| 28 | - /** |
|
| 28 | +/** |
|
| 29 | 29 | * The class constructor |
| 30 | 30 | */ |
| 31 | - public function __construct(TemplateEngine $xTemplateEngine) |
|
| 32 | - { |
|
| 33 | - $this->xTemplateEngine = $xTemplateEngine; |
|
| 34 | - } |
|
| 31 | +public function __construct(TemplateEngine $xTemplateEngine) |
|
| 32 | +{ |
|
| 33 | +$this->xTemplateEngine = $xTemplateEngine; |
|
| 34 | +} |
|
| 35 | 35 | |
| 36 | - /** |
|
| 36 | +/** |
|
| 37 | 37 | * Add a namespace to this view renderer |
| 38 | 38 | * |
| 39 | 39 | * @param string $sNamespace The namespace name |
@@ -42,28 +42,28 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return void |
| 44 | 44 | */ |
| 45 | - public function addNamespace(string $sNamespace, string $sDirectory, string $sExtension = ''): void |
|
| 46 | - { |
|
| 47 | - $this->xTemplateEngine->addNamespace($sNamespace, $sDirectory, $sExtension); |
|
| 48 | - } |
|
| 45 | +public function addNamespace(string $sNamespace, string $sDirectory, string $sExtension = ''): void |
|
| 46 | +{ |
|
| 47 | +$this->xTemplateEngine->addNamespace($sNamespace, $sDirectory, $sExtension); |
|
| 48 | +} |
|
| 49 | 49 | |
| 50 | - /** |
|
| 50 | +/** |
|
| 51 | 51 | * Render a view |
| 52 | 52 | * |
| 53 | 53 | * @param Store $store A store populated with the view data |
| 54 | 54 | * |
| 55 | 55 | * @return string The string representation of the view |
| 56 | 56 | */ |
| 57 | - public function render(Store $store): string |
|
| 58 | - { |
|
| 59 | - $sViewName = $store->getViewName(); |
|
| 60 | - $sNamespace = $store->getNamespace(); |
|
| 61 | - // In this view renderer, the namespace must always be prepended to the view name. |
|
| 62 | - if(substr($sViewName, 0, strlen($sNamespace) + 2) != $sNamespace . '::') |
|
| 63 | - { |
|
| 64 | - $sViewName = $sNamespace . '::' . $sViewName; |
|
| 65 | - } |
|
| 66 | - // Render the template |
|
| 67 | - return trim($this->xTemplateEngine->render($sViewName, $store->getViewData()), " \t\n"); |
|
| 68 | - } |
|
| 57 | +public function render(Store $store): string |
|
| 58 | +{ |
|
| 59 | +$sViewName = $store->getViewName(); |
|
| 60 | +$sNamespace = $store->getNamespace(); |
|
| 61 | +// In this view renderer, the namespace must always be prepended to the view name. |
|
| 62 | +if(substr($sViewName, 0, strlen($sNamespace) + 2) != $sNamespace . '::') |
|
| 63 | +{ |
|
| 64 | +$sViewName = $sNamespace . '::' . $sViewName; |
|
| 65 | +} |
|
| 66 | +// Render the template |
|
| 67 | +return trim($this->xTemplateEngine->render($sViewName, $store->getViewData()), " \t\n"); |
|
| 68 | +} |
|
| 69 | 69 | } |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface ResponsePluginInterface |
| 8 | 8 | { |
| 9 | - /** |
|
| 9 | +/** |
|
| 10 | 10 | * Get the attached response |
| 11 | 11 | * |
| 12 | 12 | * @return AbstractResponse|null |
| 13 | 13 | */ |
| 14 | - public function response(): ?AbstractResponse; |
|
| 14 | +public function response(): ?AbstractResponse; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 16 | +/** |
|
| 17 | 17 | * @param AbstractResponse $xResponse The response |
| 18 | 18 | * |
| 19 | 19 | * @return static |
| 20 | 20 | */ |
| 21 | - public function initPlugin(AbstractResponse $xResponse): static; |
|
| 21 | +public function initPlugin(AbstractResponse $xResponse): static; |
|
| 22 | 22 | } |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | interface CallableRegistryInterface |
| 6 | 6 | { |
| 7 | - /** |
|
| 7 | +/** |
|
| 8 | 8 | * Check if the provided options are correct, and convert them into an array. |
| 9 | 9 | * |
| 10 | 10 | * @param string $sCallable |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | * |
| 13 | 13 | * @return array |
| 14 | 14 | */ |
| 15 | - public function checkOptions(string $sCallable, $xOptions): array; |
|
| 15 | +public function checkOptions(string $sCallable, $xOptions): array; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 17 | +/** |
|
| 18 | 18 | * Register a callable entity: a function or a class. |
| 19 | 19 | * |
| 20 | 20 | * Called by the <Jaxon\Plugin\RequestManager> when a user script |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return bool |
| 29 | 29 | */ |
| 30 | - public function register(string $sType, string $sCallable, array $aOptions): bool; |
|
| 30 | +public function register(string $sType, string $sCallable, array $aOptions): bool; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 32 | +/** |
|
| 33 | 33 | * Get the callable object for a registered item |
| 34 | 34 | * |
| 35 | 35 | * @param string $sCallable |
| 36 | 36 | * |
| 37 | 37 | * @return mixed |
| 38 | 38 | */ |
| 39 | - public function getCallable(string $sCallable): mixed; |
|
| 39 | +public function getCallable(string $sCallable): mixed; |
|
| 40 | 40 | } |
@@ -22,53 +22,53 @@ |
||
| 22 | 22 | |
| 23 | 23 | class ConfigScriptGenerator extends AbstractCodeGenerator |
| 24 | 24 | { |
| 25 | - /** |
|
| 25 | +/** |
|
| 26 | 26 | * The constructor |
| 27 | 27 | * |
| 28 | 28 | * @param ParameterReader $xParameterReader |
| 29 | 29 | * @param TemplateEngine $xTemplateEngine |
| 30 | 30 | * @param ConfigManager $xConfigManager |
| 31 | 31 | */ |
| 32 | - public function __construct(private ParameterReader $xParameterReader, |
|
| 33 | - private TemplateEngine $xTemplateEngine, private ConfigManager $xConfigManager) |
|
| 34 | - {} |
|
| 32 | +public function __construct(private ParameterReader $xParameterReader, |
|
| 33 | +private TemplateEngine $xTemplateEngine, private ConfigManager $xConfigManager) |
|
| 34 | +{} |
|
| 35 | 35 | |
| 36 | - /** |
|
| 36 | +/** |
|
| 37 | 37 | * Get the value of a config option |
| 38 | 38 | * |
| 39 | 39 | * @param string $sName The option name |
| 40 | 40 | * |
| 41 | 41 | * @return mixed |
| 42 | 42 | */ |
| 43 | - private function option(string $sName): mixed |
|
| 44 | - { |
|
| 45 | - return $this->xConfigManager->getOption($sName); |
|
| 46 | - } |
|
| 43 | +private function option(string $sName): mixed |
|
| 44 | +{ |
|
| 45 | +return $this->xConfigManager->getOption($sName); |
|
| 46 | +} |
|
| 47 | 47 | |
| 48 | - /** |
|
| 48 | +/** |
|
| 49 | 49 | * @inheritDoc |
| 50 | 50 | * @throws UriException |
| 51 | 51 | */ |
| 52 | - public function getScript(): string |
|
| 53 | - { |
|
| 54 | - // It is important to call $this->xParameterReader->uri() only if necessary. |
|
| 55 | - $sUri = $this->xConfigManager->getOption('core.request.uri') ?: |
|
| 56 | - $this->xParameterReader->uri(); |
|
| 57 | - $aOptions = [ |
|
| 58 | - 'sResponseType' => 'JSON', |
|
| 59 | - 'sVersion' => $this->option('core.version'), |
|
| 60 | - 'sLanguage' => $this->option('core.language'), |
|
| 61 | - 'sRequestURI' => $sUri, |
|
| 62 | - 'sDefaultMode' => $this->option('core.request.mode'), |
|
| 63 | - 'sDefaultMethod' => $this->option('core.request.method'), |
|
| 64 | - 'sCsrfMetaName' => $this->option('core.request.csrf_meta'), |
|
| 65 | - 'bDebug' => $this->option('core.debug.on'), |
|
| 66 | - 'bVerboseDebug' => $this->option('core.debug.verbose'), |
|
| 67 | - 'sDebugOutputID' => $this->option('core.debug.output_id'), |
|
| 68 | - 'nResponseQueueSize' => $this->option('js.lib.queue_size'), |
|
| 69 | - 'sStatusMessages' => $this->option('js.lib.show_status') ? 'true' : 'false', |
|
| 70 | - 'sWaitCursor' => $this->option('js.lib.show_cursor') ? 'true' : 'false', |
|
| 71 | - ]; |
|
| 72 | - return $this->xTemplateEngine->render('jaxon::plugins/config.js', $aOptions); |
|
| 73 | - } |
|
| 52 | +public function getScript(): string |
|
| 53 | +{ |
|
| 54 | +// It is important to call $this->xParameterReader->uri() only if necessary. |
|
| 55 | +$sUri = $this->xConfigManager->getOption('core.request.uri') ?: |
|
| 56 | +$this->xParameterReader->uri(); |
|
| 57 | +$aOptions = [ |
|
| 58 | +'sResponseType' => 'JSON', |
|
| 59 | +'sVersion' => $this->option('core.version'), |
|
| 60 | +'sLanguage' => $this->option('core.language'), |
|
| 61 | +'sRequestURI' => $sUri, |
|
| 62 | +'sDefaultMode' => $this->option('core.request.mode'), |
|
| 63 | +'sDefaultMethod' => $this->option('core.request.method'), |
|
| 64 | +'sCsrfMetaName' => $this->option('core.request.csrf_meta'), |
|
| 65 | +'bDebug' => $this->option('core.debug.on'), |
|
| 66 | +'bVerboseDebug' => $this->option('core.debug.verbose'), |
|
| 67 | +'sDebugOutputID' => $this->option('core.debug.output_id'), |
|
| 68 | +'nResponseQueueSize' => $this->option('js.lib.queue_size'), |
|
| 69 | +'sStatusMessages' => $this->option('js.lib.show_status') ? 'true' : 'false', |
|
| 70 | +'sWaitCursor' => $this->option('js.lib.show_cursor') ? 'true' : 'false', |
|
| 71 | +]; |
|
| 72 | +return $this->xTemplateEngine->render('jaxon::plugins/config.js', $aOptions); |
|
| 73 | +} |
|
| 74 | 74 | } |