@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <ul class="pagination"><?php |
| 2 | - if(($this->prev)) |
|
| 2 | + if (($this->prev)) |
|
| 3 | 3 | { |
| 4 | 4 | echo $this->prev; |
| 5 | 5 | } |
| 6 | - foreach($this->links as $link) |
|
| 6 | + foreach ($this->links as $link) |
|
| 7 | 7 | { |
| 8 | 8 | echo $link; |
| 9 | 9 | } |
| 10 | - if(($this->next)) |
|
| 10 | + if (($this->next)) |
|
| 11 | 11 | { |
| 12 | 12 | echo $this->next; |
| 13 | 13 | } |
@@ -6,7 +6,8 @@ discard block |
||
| 6 | 6 | if(<?php echo $sJsClass ?> === undefined) { |
| 7 | 7 | <?php echo $sJsClass ?> = {}; |
| 8 | 8 | } |
| 9 | -<?php else: ?> |
|
| 9 | +<?php else { |
|
| 10 | + : ?> |
|
| 10 | 11 | <?php echo $sJsClass ?> = {}; |
| 11 | 12 | <?php endif ?> |
| 12 | 13 | <?php foreach($this->aMethods as $aMethod): ?> |
@@ -17,3 +18,4 @@ discard block |
||
| 17 | 18 | echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }); |
| 18 | 19 | }; |
| 19 | 20 | <?php endforeach; |
| 21 | +} |
|
@@ -2,18 +2,18 @@ |
||
| 2 | 2 | <?php |
| 3 | 3 | // An exported PHP class can have the same name as a subdir in the same parent dir. |
| 4 | 4 | // So, we must make sure that embedded js objects do not already exist, before we create them. |
| 5 | -if(strpos($sJsClass, '.') !== false): ?> |
|
| 5 | +if (strpos($sJsClass, '.') !== false): ?> |
|
| 6 | 6 | if(<?php echo $sJsClass ?> === undefined) { |
| 7 | 7 | <?php echo $sJsClass ?> = {}; |
| 8 | 8 | } |
| 9 | 9 | <?php else: ?> |
| 10 | 10 | <?php echo $sJsClass ?> = {}; |
| 11 | 11 | <?php endif ?> |
| 12 | -<?php foreach($this->aMethods as $aMethod): ?> |
|
| 12 | +<?php foreach ($this->aMethods as $aMethod): ?> |
|
| 13 | 13 | <?php echo $sJsClass ?>.<?php echo $aMethod['name'] ?> = function() { |
| 14 | 14 | return jaxon.request({ type: 'class', name: '<?php echo $this->sClass ?>', method: '<?php |
| 15 | 15 | echo $aMethod['name'] ?>' }, { parameters: arguments<?php |
| 16 | - foreach($aMethod['options'] as $sKey => $sValue): ?>, <?php |
|
| 16 | + foreach ($aMethod['options'] as $sKey => $sValue): ?>, <?php |
|
| 17 | 17 | echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }); |
| 18 | 18 | }; |
| 19 | 19 | <?php endforeach; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php echo $this->sJsName ?> = function() { |
| 2 | 2 | return jaxon.request({ type: 'func', name: '<?php |
| 3 | 3 | echo $this->sName ?>' }, { parameters: arguments<?php |
| 4 | - foreach($this->aOptions as $sKey => $sValue): ?>, <?php |
|
| 4 | + foreach ($this->aOptions as $sKey => $sValue): ?>, <?php |
|
| 5 | 5 | echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }); |
| 6 | 6 | }; |
@@ -6,20 +6,20 @@ |
||
| 6 | 6 | jaxon.config.defaultMethod = "<?php echo $this->sDefaultMethod ?>"; |
| 7 | 7 | jaxon.config.responseType = "<?php echo $this->sResponseType ?>"; |
| 8 | 8 | |
| 9 | -<?php if($this->nResponseQueueSize > 0): ?> |
|
| 9 | +<?php if ($this->nResponseQueueSize > 0): ?> |
|
| 10 | 10 | jaxon.config.responseQueueSize = <?php echo $this->nResponseQueueSize ?>; |
| 11 | 11 | <?php endif ?> |
| 12 | 12 | |
| 13 | -<?php if(($this->bDebug)): ?> |
|
| 13 | +<?php if (($this->bDebug)): ?> |
|
| 14 | 14 | jaxon.debug.active = true; |
| 15 | -<?php if(($this->sDebugOutputID)): ?> |
|
| 15 | +<?php if (($this->sDebugOutputID)): ?> |
|
| 16 | 16 | jaxon.debug.outputID = "<?php echo $this->sDebugOutputID ?>"; |
| 17 | 17 | <?php endif ?> |
| 18 | -<?php if(($this->bVerboseDebug)): ?> |
|
| 18 | +<?php if (($this->bVerboseDebug)): ?> |
|
| 19 | 19 | jaxon.debug.verbose.active = true; |
| 20 | 20 | <?php endif ?> |
| 21 | 21 | <?php endif ?> |
| 22 | 22 | |
| 23 | -<?php if(($this->sCsrfMetaName)): ?> |
|
| 23 | +<?php if (($this->sCsrfMetaName)): ?> |
|
| 24 | 24 | jaxon.setCsrf('<?php echo $this->sCsrfMetaName ?>'); |
| 25 | 25 | <?php endif ?> |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php if(($this->sScript)): ?> |
|
| 1 | +<?php if (($this->sScript)): ?> |
|
| 2 | 2 | <script type="text/javascript" <?php echo $this->sJsOptions ?> charset="UTF-8"> |
| 3 | 3 | /* <![CDATA[ */ |
| 4 | 4 | <?php echo $this->sScript, "\n" ?> |
@@ -1,3 +1,3 @@ |
||
| 1 | -<?php foreach($this->aUrls as $sUrl): |
|
| 1 | +<?php foreach ($this->aUrls as $sUrl): |
|
| 2 | 2 | $this->include('jaxon::plugins/include.js', ['sUrl' => $sUrl, 'sJsOptions' => $this->sJsOptions]); |
| 3 | 3 | endforeach; |
@@ -237,7 +237,7 @@ |
||
| 237 | 237 | */ |
| 238 | 238 | public function val(string $sKey, $xValue) |
| 239 | 239 | { |
| 240 | - $this->xLibContainer->offsetSet($sKey, $xValue); |
|
| 240 | + $this->xLibContainer->offsetSet($sKey, $xValue); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /** |
@@ -120,8 +120,7 @@ discard block |
||
| 120 | 120 | public function setLogger(LoggerInterface|Closure $xLogger) |
| 121 | 121 | { |
| 122 | 122 | is_a($xLogger, LoggerInterface::class) ? |
| 123 | - $this->val(LoggerInterface::class, $xLogger) : |
|
| 124 | - $this->set(LoggerInterface::class, $xLogger); |
|
| 123 | + $this->val(LoggerInterface::class, $xLogger) : $this->set(LoggerInterface::class, $xLogger); |
|
| 125 | 124 | } |
| 126 | 125 | |
| 127 | 126 | /** |
@@ -200,7 +199,7 @@ discard block |
||
| 200 | 199 | return $this->xAppContainer != null && $this->xAppContainer->has($sClass) ? |
| 201 | 200 | $this->xAppContainer->get($sClass) : $this->xLibContainer->offsetGet($sClass); |
| 202 | 201 | } |
| 203 | - catch(Exception|Throwable $e) |
|
| 202 | + catch (Exception|Throwable $e) |
|
| 204 | 203 | { |
| 205 | 204 | $xLogger = $this->g(LoggerInterface::class); |
| 206 | 205 | $xTranslator = $this->g(Translator::class); |
@@ -266,15 +265,15 @@ discard block |
||
| 266 | 265 | { |
| 267 | 266 | $xType = $xParameter->getType(); |
| 268 | 267 | // Check the parameter class first. |
| 269 | - if($xType instanceof ReflectionNamedType) |
|
| 268 | + if ($xType instanceof ReflectionNamedType) |
|
| 270 | 269 | { |
| 271 | 270 | // Check the class + the name |
| 272 | - if($this->has($xType->getName() . ' $' . $xParameter->getName())) |
|
| 271 | + if ($this->has($xType->getName() . ' $' . $xParameter->getName())) |
|
| 273 | 272 | { |
| 274 | 273 | return $this->get($xType->getName() . ' $' . $xParameter->getName()); |
| 275 | 274 | } |
| 276 | 275 | // Check the class only |
| 277 | - if($this->has($xType->getName())) |
|
| 276 | + if ($this->has($xType->getName())) |
|
| 278 | 277 | { |
| 279 | 278 | return $this->get($xType->getName()); |
| 280 | 279 | } |
@@ -199,8 +199,7 @@ |
||
| 199 | 199 | { |
| 200 | 200 | return $this->xAppContainer != null && $this->xAppContainer->has($sClass) ? |
| 201 | 201 | $this->xAppContainer->get($sClass) : $this->xLibContainer->offsetGet($sClass); |
| 202 | - } |
|
| 203 | - catch(Exception|Throwable $e) |
|
| 202 | + } catch(Exception|Throwable $e) |
|
| 204 | 203 | { |
| 205 | 204 | $xLogger = $this->g(LoggerInterface::class); |
| 206 | 205 | $xTranslator = $this->g(Translator::class); |
@@ -37,7 +37,6 @@ |
||
| 37 | 37 | public function getMetadataReader(string $sReaderId): MetadataReaderInterface |
| 38 | 38 | { |
| 39 | 39 | return $this->h("metadata_reader_$sReaderId") ? |
| 40 | - $this->g("metadata_reader_$sReaderId") : |
|
| 41 | - $this->g('metadata_reader_null'); |
|
| 40 | + $this->g("metadata_reader_$sReaderId") : $this->g('metadata_reader_null'); |
|
| 42 | 41 | } |
| 43 | 42 | } |
@@ -42,13 +42,13 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function make(string|ReflectionClass $xClass): mixed |
| 44 | 44 | { |
| 45 | - if(is_string($xClass)) |
|
| 45 | + if (is_string($xClass)) |
|
| 46 | 46 | { |
| 47 | 47 | // Create the reflection class instance |
| 48 | 48 | $xClass = new ReflectionClass($xClass); |
| 49 | 49 | } |
| 50 | 50 | // Use the Reflection class to get the parameters of the constructor |
| 51 | - if(($constructor = $xClass->getConstructor()) === null) |
|
| 51 | + if (($constructor = $xClass->getConstructor()) === null) |
|
| 52 | 52 | { |
| 53 | 53 | return $xClass->newInstance(); |
| 54 | 54 | } |