@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use WebinoAppLib\Response\Content\SourcePreview; |
10 | 10 | use WebinoAppLib\Router\DefaultRoute; |
11 | 11 | |
12 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
12 | +require __DIR__.'/../../vendor/autoload.php'; |
|
13 | 13 | |
14 | 14 | $appCore = Webino::application(); |
15 | 15 | |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | * Binding to |
18 | 18 | * core bootstrap. |
19 | 19 | */ |
20 | -$appCore->bind(AppEvent::BOOTSTRAP, function (AppEvent $event) { |
|
20 | +$appCore->bind(AppEvent::BOOTSTRAP, function(AppEvent $event) { |
|
21 | 21 | $event->getApp()->set('responseText', 'Hello Webino!'); |
22 | 22 | }); |
23 | 23 | |
24 | 24 | $app = $appCore->bootstrap(); |
25 | 25 | |
26 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
26 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
27 | 27 | $event->setResponseContent([ |
28 | 28 | $event->getApp()->get('responseText'), |
29 | 29 | new SourcePreview(__FILE__), |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | use WebinoEventLib\EventsAwareInterface; |
14 | 14 | use WebinoEventLib\EventsAwareTrait; |
15 | 15 | |
16 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
16 | +require __DIR__.'/../../vendor/autoload.php'; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Custom event |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * Binding to |
91 | 91 | * custom event. |
92 | 92 | */ |
93 | -$myService->getEvents()->attach('doSomething', function (Event $event) use ($app) { |
|
93 | +$myService->getEvents()->attach('doSomething', function(Event $event) use ($app) { |
|
94 | 94 | $app->set('responseText', new Html\Text($event->getParam('responseText'))); |
95 | 95 | }); |
96 | 96 | |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | * Binding to custom |
99 | 99 | * event object. |
100 | 100 | */ |
101 | -$myService->getEvents()->attach('doSomethingDifferent', function (MyServiceEvent $event) use ($app) { |
|
102 | - $app->get('responseText')->setValue('%s ' . $event->getResponseText()); |
|
101 | +$myService->getEvents()->attach('doSomethingDifferent', function(MyServiceEvent $event) use ($app) { |
|
102 | + $app->get('responseText')->setValue('%s '.$event->getResponseText()); |
|
103 | 103 | }); |
104 | 104 | |
105 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) use ($myService) { |
|
105 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) use ($myService) { |
|
106 | 106 | /** |
107 | 107 | * Calling custom |
108 | 108 | * service methods. |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | use WebinoExamplesLib\Html\ScrollBox; |
11 | 11 | use WebinoHtmlLib\Html; |
12 | 12 | |
13 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
13 | +require __DIR__.'/../../vendor/autoload.php'; |
|
14 | 14 | |
15 | 15 | $app = Webino::application()->bootstrap(); |
16 | 16 | |
17 | 17 | // setup |
18 | -$app->file()->write('my/folder/test.txt', 'Test file contents ' . rand()); |
|
18 | +$app->file()->write('my/folder/test.txt', 'Test file contents '.rand()); |
|
19 | 19 | $app->file()->write('my/folder/test-2.txt', null); |
20 | 20 | |
21 | 21 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | $app->file()->delete('my/folder/test-2.txt'); |
26 | 26 | |
27 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
27 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
28 | 28 | /** |
29 | 29 | * Obtaining test file contents |
30 | 30 | * and removing a file at once. |
@@ -1,1 +1,1 @@ |
||
1 | -<?php require __DIR__ . '/../events-bind-app-bootstrap-core-config/index.php'; |
|
1 | +<?php require __DIR__.'/../events-bind-app-bootstrap-core-config/index.php'; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | use WebinoAppLib\Response\Content\SourcePreview; |
12 | 12 | use WebinoAppLib\Router\DefaultRoute; |
13 | 13 | |
14 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
14 | +require __DIR__.'/../../vendor/autoload.php'; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Custom service |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | $app->set(MyService::class, MyServiceFactory::class); |
50 | 50 | |
51 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
51 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
52 | 52 | /** |
53 | 53 | * Obtaining service |
54 | 54 | * instance. |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | use WebinoExamplesLib\Html\ConsolePreview; |
13 | 13 | use WebinoHtmlLib\Html; |
14 | 14 | |
15 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
15 | +require __DIR__.'/../../vendor/autoload.php'; |
|
16 | 16 | |
17 | 17 | $config = Webino::config([ |
18 | 18 | /** |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | * Binding to custom |
32 | 32 | * console command. |
33 | 33 | */ |
34 | -$app->bindConsole('myCommand', function (ConsoleEvent $event) { |
|
34 | +$app->bindConsole('myCommand', function(ConsoleEvent $event) { |
|
35 | 35 | $cli = $event->getCli(); |
36 | 36 | $cli->out('My custom command example!')->br(); |
37 | 37 | }); |
38 | 38 | |
39 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
39 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
40 | 40 | $event->setResponseContent([ |
41 | 41 | new Html\Text('Use Command Line Interface!'), |
42 | 42 | new ConsolePreview('preview.jpg'), |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | use WebinoExamplesLib\Html\ConsolePreview; |
14 | 14 | use WebinoHtmlLib\Html; |
15 | 15 | |
16 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
16 | +require __DIR__.'/../../vendor/autoload.php'; |
|
17 | 17 | |
18 | 18 | class MyConsoleCommand extends AbstractConsoleCommand |
19 | 19 | { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $cli = $event->getCli(); |
32 | 32 | |
33 | - $input = $cli->input('How you doin?')->accept(function ($result) { |
|
33 | + $input = $cli->input('How you doin?')->accept(function($result) { |
|
34 | 34 | return ('Fine' === $result); |
35 | 35 | }); |
36 | 36 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $app = Webino::application($config)->bootstrap(); |
48 | 48 | |
49 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
49 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
50 | 50 | $event->setResponseContent([ |
51 | 51 | new Html\Text('Use Command Line Interface!'), |
52 | 52 | new ConsolePreview('preview.gif'), |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | use WebinoViewLib\Feature\CommonView; |
17 | 17 | use WebinoViewLib\Feature\NodeView; |
18 | 18 | |
19 | -require __DIR__ . '/../vendor/autoload.php'; |
|
19 | +require __DIR__.'/../vendor/autoload.php'; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Custom view component |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | list($section) = explode('-', $info['filename'], 2); |
51 | 51 | $label = ucwords(str_replace('-', ' ', $info['filename'])); |
52 | - $examples[ucfirst($section)][] = new Html\Url($info['filename'], $label) . new Html\LineBreak; |
|
52 | + $examples[ucfirst($section)][] = new Html\Url($info['filename'], $label).new Html\LineBreak; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | $this->api = ''; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $app = Webino::application($config, Webino::debugger(Webino::debuggerOptions()->setBar()))->bootstrap(); |
102 | 102 | |
103 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
103 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
104 | 104 | $event->setResponse(new ViewResponse); |
105 | 105 | }); |
106 | 106 |
@@ -1,1 +1,1 @@ |
||
1 | -<?php require __DIR__ . '/../service-invokable-config/index.php'; |
|
1 | +<?php require __DIR__.'/../service-invokable-config/index.php'; |