@@ -61,19 +61,19 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | $this->xRepository = $xRepository; |
| 63 | 63 | |
| 64 | - if(!empty($_GET['jxncls'])) |
|
| 64 | + if (!empty($_GET['jxncls'])) |
|
| 65 | 65 | { |
| 66 | 66 | $this->sRequestedClass = $_GET['jxncls']; |
| 67 | 67 | } |
| 68 | - if(!empty($_GET['jxnmthd'])) |
|
| 68 | + if (!empty($_GET['jxnmthd'])) |
|
| 69 | 69 | { |
| 70 | 70 | $this->sRequestedMethod = $_GET['jxnmthd']; |
| 71 | 71 | } |
| 72 | - if(!empty($_POST['jxncls'])) |
|
| 72 | + if (!empty($_POST['jxncls'])) |
|
| 73 | 73 | { |
| 74 | 74 | $this->sRequestedClass = $_POST['jxncls']; |
| 75 | 75 | } |
| 76 | - if(!empty($_POST['jxnmthd'])) |
|
| 76 | + if (!empty($_POST['jxnmthd'])) |
|
| 77 | 77 | { |
| 78 | 78 | $this->sRequestedMethod = $_POST['jxnmthd']; |
| 79 | 79 | } |
@@ -100,20 +100,20 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function register($sType, $sClassName, $aOptions) |
| 102 | 102 | { |
| 103 | - if($sType != $this->getName()) |
|
| 103 | + if ($sType != $this->getName()) |
|
| 104 | 104 | { |
| 105 | 105 | return false; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - if(!is_string($sClassName)) |
|
| 108 | + if (!is_string($sClassName)) |
|
| 109 | 109 | { |
| 110 | 110 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.invalid-declaration')); |
| 111 | 111 | } |
| 112 | - if(is_string($aOptions)) |
|
| 112 | + if (is_string($aOptions)) |
|
| 113 | 113 | { |
| 114 | 114 | $aOptions = ['include' => $aOptions]; |
| 115 | 115 | } |
| 116 | - if(!is_array($aOptions)) |
|
| 116 | + if (!is_array($aOptions)) |
|
| 117 | 117 | { |
| 118 | 118 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.invalid-declaration')); |
| 119 | 119 | } |
@@ -151,13 +151,13 @@ discard block |
||
| 151 | 151 | public function canProcessRequest() |
| 152 | 152 | { |
| 153 | 153 | // Check the validity of the class name |
| 154 | - if($this->sRequestedClass !== null && !$this->validateClass($this->sRequestedClass)) |
|
| 154 | + if ($this->sRequestedClass !== null && !$this->validateClass($this->sRequestedClass)) |
|
| 155 | 155 | { |
| 156 | 156 | $this->sRequestedClass = null; |
| 157 | 157 | $this->sRequestedMethod = null; |
| 158 | 158 | } |
| 159 | 159 | // Check the validity of the method name |
| 160 | - if($this->sRequestedMethod !== null && !$this->validateMethod($this->sRequestedMethod)) |
|
| 160 | + if ($this->sRequestedMethod !== null && !$this->validateMethod($this->sRequestedMethod)) |
|
| 161 | 161 | { |
| 162 | 162 | $this->sRequestedClass = null; |
| 163 | 163 | $this->sRequestedMethod = null; |
@@ -172,14 +172,14 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function processRequest() |
| 174 | 174 | { |
| 175 | - if(!$this->canProcessRequest()) |
|
| 175 | + if (!$this->canProcessRequest()) |
|
| 176 | 176 | { |
| 177 | 177 | return false; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | // Find the requested method |
| 181 | 181 | $xCallableObject = $this->xRepository->getCallableObject($this->sRequestedClass); |
| 182 | - if(!$xCallableObject || !$xCallableObject->hasMethod($this->sRequestedMethod)) |
|
| 182 | + if (!$xCallableObject || !$xCallableObject->hasMethod($this->sRequestedMethod)) |
|
| 183 | 183 | { |
| 184 | 184 | // Unable to find the requested object or method |
| 185 | 185 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.invalid', |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | // Call the requested method |
| 190 | 190 | $aArgs = $this->getRequestManager()->process(); |
| 191 | 191 | $xResponse = $xCallableObject->call($this->sRequestedMethod, $aArgs); |
| 192 | - if(($xResponse)) |
|
| 192 | + if (($xResponse)) |
|
| 193 | 193 | { |
| 194 | 194 | $this->getResponseManager()->append($xResponse); |
| 195 | 195 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | protected function getPrevLink() |
| 65 | 65 | { |
| 66 | - if(!($sCall = $this->xPaginator->getPrevCall())) |
|
| 66 | + if (!($sCall = $this->xPaginator->getPrevCall())) |
|
| 67 | 67 | { |
| 68 | 68 | return ''; |
| 69 | 69 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | protected function getNextLink() |
| 80 | 80 | { |
| 81 | - if(!($sCall = $this->xPaginator->getNextCall())) |
|
| 81 | + if (!($sCall = $this->xPaginator->getNextCall())) |
|
| 82 | 82 | { |
| 83 | 83 | return ''; |
| 84 | 84 | } |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | protected function getLinks() |
| 95 | 95 | { |
| 96 | 96 | $sLinks = ''; |
| 97 | - foreach($this->xPaginator->getPages() as $page) |
|
| 97 | + foreach ($this->xPaginator->getPages() as $page) |
|
| 98 | 98 | { |
| 99 | - if($page['call']) |
|
| 99 | + if ($page['call']) |
|
| 100 | 100 | { |
| 101 | 101 | $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled'); |
| 102 | 102 | $sLinks .= $this->xTemplate->render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]); |
@@ -100,8 +100,7 @@ |
||
| 100 | 100 | { |
| 101 | 101 | $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled'); |
| 102 | 102 | $sLinks .= $this->xTemplate->render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]); |
| 103 | - } |
|
| 104 | - else |
|
| 103 | + } else |
|
| 105 | 104 | { |
| 106 | 105 | $sLinks .= $this->xTemplate->render('pagination::links/disabled', ['text' => $page['num']]); |
| 107 | 106 | } |