@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author trabis <[email protected]> |
18 | 18 | */ |
19 | 19 | |
20 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
20 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
21 | 21 | |
22 | 22 | $xoops = Xoops::getInstance(); |
23 | 23 | $xoops->header(); |
@@ -59,27 +59,27 @@ discard block |
||
59 | 59 | echo '<h4>Manual read() and write()</h4>'; |
60 | 60 | // We can do things manually |
61 | 61 | $key = 'module/codex/firstkey'; |
62 | -echo $key . ' '; |
|
62 | +echo $key.' '; |
|
63 | 63 | if (!$readData = $cache->read($key)) { |
64 | 64 | echo 'Had to rebuild: '; |
65 | 65 | $content = 'This is my content'; |
66 | 66 | $cache->write($key, $content); |
67 | 67 | $readData = $content; |
68 | 68 | } |
69 | -echo $readData . '<br />'; |
|
69 | +echo $readData.'<br />'; |
|
70 | 70 | |
71 | 71 | echo '<h4>Streamlined with cacheRead()</h4>'; |
72 | 72 | // We can let the cache handle lots of the details. We just provide a function |
73 | 73 | // that builds the content to be cached. The function can be any callback/closure. |
74 | 74 | $key = 'module/codex/secondkey'; |
75 | -echo $key . ' ' . $cache->cacheRead($key, 'getSomeContent') . '<br />'; |
|
75 | +echo $key.' '.$cache->cacheRead($key, 'getSomeContent').'<br />'; |
|
76 | 76 | |
77 | 77 | echo '<h3>Simplify even more with Xmf</h3>'; |
78 | 78 | // Xmf provide cache simplified cache functions that automatically follow the |
79 | 79 | // naming standard for module specific cache keys. |
80 | 80 | $xmfCache = new \Xmf\Module\Helper\Cache(); |
81 | 81 | $key = 'xmfdemo'; |
82 | -echo $key . ' ' . $xmfCache->cacheRead($key, 'getSomeContent') . '<br />'; |
|
82 | +echo $key.' '.$xmfCache->cacheRead($key, 'getSomeContent').'<br />'; |
|
83 | 83 | |
84 | 84 | echo '<h3>Alternate Caches</h3>'; |
85 | 85 | // Xoops cache() method can take a name parameter, to choose a cache configuration. |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | // The default cache definition is named 'default' and it will be used if no |
88 | 88 | // name is specified to cache() or if no cache is defined for the specified name. |
89 | 89 | $key = 'module/codex/alternate'; |
90 | -echo $key . ' ' . $xoops->cache('alternate')->cacheRead($key, 'getSomeContent') . '<br />'; |
|
90 | +echo $key.' '.$xoops->cache('alternate')->cacheRead($key, 'getSomeContent').'<br />'; |
|
91 | 91 | |
92 | 92 | echo '<br /><a href="?">Refresh</a> - <a href="?delete=1">Delete caches</a>'; |
93 | 93 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @author trabis <[email protected]> |
19 | 19 | */ |
20 | 20 | |
21 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
21 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
22 | 22 | |
23 | 23 | $xoops = Xoops::getInstance(); |
24 | 24 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @author Richard Griffith <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -require dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +require dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @author Laurent JEN - aka DuGris |
23 | 23 | */ |
24 | 24 | |
25 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
25 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
26 | 26 | |
27 | 27 | $xoops = Xoops::getInstance(); |
28 | 28 | $xoops->header(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | echo $errors; |
56 | 56 | } |
57 | 57 | } catch (\InvalidArgumentException $e) { |
58 | - echo 'Message was not sent. ' . $e->getMessage(); |
|
58 | + echo 'Message was not sent. '.$e->getMessage(); |
|
59 | 59 | } |
60 | 60 | } else { |
61 | 61 | $form = new ThemeForm('Email Service Example', 'example', '', 'post', true, 'horizontal'); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $code = new Xoops\Form\Text('Code', 'code', 10, 25, '', 'Code...'); |
27 | 27 | $code->setDescription('Description code'); |
28 | 28 | $code->setPattern('^.{3,}$', 'You need at least 3 characters'); |
29 | -$code->setDatalist(array('list 1','list 2','list 3')); |
|
29 | +$code->setDatalist(array('list 1', 'list 2', 'list 3')); |
|
30 | 30 | $form->addElement($code, true); |
31 | 31 | |
32 | 32 | $password = new Xoops\Form\Password('Password', 'password', null, null, '', 'off', 'Enter Password'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $checkbox->setDescription('Description Checkbox'); |
73 | 73 | $form->addElement($checkbox, true); |
74 | 74 | |
75 | -$label= new Xoops\Form\Label('Label', 'label', 'label'); |
|
75 | +$label = new Xoops\Form\Label('Label', 'label', 'label'); |
|
76 | 76 | $label->setDescription('Description Label'); |
77 | 77 | $form->addElement($label, true); |
78 | 78 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -26,5 +26,5 @@ discard block |
||
26 | 26 | See how Codex module hooks into the system module just by using this codex/class/plugin/system.php |
27 | 27 | "; |
28 | 28 | |
29 | -\Xoops\Utils::dumpFile(__DIR__ . '/class/plugin/system.php'); |
|
29 | +\Xoops\Utils::dumpFile(__DIR__.'/class/plugin/system.php'); |
|
30 | 30 | $xoops->footer(); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @author Laurent JEN - aka DuGris |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @author trabis <[email protected]> |
19 | 19 | */ |
20 | 20 | |
21 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
21 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
22 | 22 | |
23 | 23 | $xoops = Xoops::getInstance(); |
24 | 24 | $xoops->header(); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'caption' => 'Sub Cat', |
160 | 160 | 'name' => 'select_subcat', |
161 | 161 | 'size' => 5, |
162 | - 'value' => [2,4,6], |
|
162 | + 'value' => [2, 4, 6], |
|
163 | 163 | 'option' => [ |
164 | 164 | 1 => 'Sub 1', |
165 | 165 | 2 => 'Sub 2', |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $code = new Xoops\Form\Text('Code', 'code', 2, 25, '', 'Code...'); |
41 | 41 | $code->setDescription('Description code'); |
42 | 42 | $code->setPattern('^.{3,}$', 'You need at least 3 characters'); |
43 | -$code->setDatalist(array('list 1','list 2','list 3')); |
|
43 | +$code->setDatalist(array('list 1', 'list 2', 'list 3')); |
|
44 | 44 | $tab1->addElement($code, true); |
45 | 45 | |
46 | 46 | $password = new Xoops\Form\Password('Password', 'password', null, null, '', 'off', 'Enter Password'); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $checkbox->setDescription('Description Checkbox'); |
87 | 87 | $tab3->addElement($checkbox, true); |
88 | 88 | |
89 | -$label= new Xoops\Form\Label('Label', 'label', 'label'); |
|
89 | +$label = new Xoops\Form\Label('Label', 'label', 'label'); |
|
90 | 90 | $label->setDescription('Description Label'); |
91 | 91 | $tab3->addElement($label, true); |
92 | 92 |