Skip to content

Commit 7d80594

Browse files
author
Sergey Surkov
committed
version 1.4.0
1 parent 0478ccb commit 7d80594

57 files changed

Lines changed: 822 additions & 442 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
{
22
"name": "symbiotic/develop",
33
"require": {
4-
"php": ">=7.2",
5-
"symbiotic/ui_backend": "1.*"
4+
"php": ">=8.0",
5+
"symbiotic/ui_backend": "1.4.*"
66
},
77
"license": "MIT",
8-
"version": "1.2.1",
8+
"version": "1.4.0",
99
"autoload": {
1010
"psr-4": {
1111
"Symbiotic\\Develop\\": "src/"
12-
},
13-
"files": [
14-
"src/functions.php"
15-
]
12+
}
1613
},
1714
"extra": {
1815
"symbiotic": {
@@ -22,12 +19,11 @@
2219
"name": "Develop",
2320
"routing": "\\Symbiotic\\Develop\\Routing",
2421
"controllers_namespace": "\\Symbiotic\\Develop\\Http\\Controllers",
25-
"version": "1.2.1",
2622
"providers": [
2723
"\\Symbiotic\\Develop\\Providers\\AppProvider"
28-
],
29-
"requires": []
30-
}
24+
]
25+
},
26+
"bootstrappers": ["\\Symbiotic\\Develop\\Bootstrap\\DebugBootstrap"]
3127
}
3228
}
3329
}

resources/stubs/resources/views/backend/index.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@extends('backend/layout')
22
<!-- РАсширяем меню макета -->
33
@section('sidebar')
4-
<a href="{{route('backend:'.app()->getId().'::test')}}">Test route</a>
5-
<a href="{{route(app()->getId().'::home')}}">Frontend route</a>
4+
<a href="{{$this->route('backend:'.$this->getAppId().'::test')}}">Test route</a>
5+
<a href="{{$this->route($this->getAppId().'::home')}}">Frontend route</a>
66
@parent
77
@endsection
88

resources/stubs/resources/views/backend/layout.blade.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<head>
33
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44
<title>@section('title')</title>
5-
<link rel="stylesheet" href="{{asset('css/backend/app.css')}}">
5+
<link rel="stylesheet" href="{{$this->asset('css/backend/app.css')}}">
66

77
<!-- Получение ссылок на файлы js выполняется также -->
8-
<script type="text/javascript" src="{{asset('js/app.js')}}"></script>
8+
<script type="text/javascript" src="{{$this->asset('js/app.js')}}"></script>
99
</head>
1010
<body>
1111
<div style="max-width: 1200px;margin: 0 auto;">
@@ -14,7 +14,7 @@
1414
<div class="col-sm-12 col-md-2">
1515
<ul>
1616
@section('sidebar')
17-
<li><a href="{{route('backend:#APP_ID#::home')}}"></a></li>
17+
<li><a href="{{$this->route('backend:#APP_ID#::home')}}"></a></li>
1818
@show
1919
</ul>
2020
</div>
@@ -24,7 +24,6 @@
2424
</div>
2525
</div>
2626
</div>
27-
2827
</div>
2928
</body>
3029
</html>

resources/stubs/resources/views/demo/backend.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@extends('backend/layout')
22
<!-- РАсширяем меню макета -->
33
@section('sidebar')
4-
<a href="{{route('backend:'.app()->getId().'::test')}}">Test route</a>
5-
<a href="{{route(app()->getId().'::home')}}">Frontend route</a>
4+
<a href="{{$this->route('backend:'.$this->getAppId().'::test')}}">Test route</a>
5+
<a href="{{$this->route($this->getAppId().'::home')}}">Frontend route</a>
66
@parent
77
@endsection
88

resources/stubs/resources/views/demo/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@section('sidebar')
88
@foreach($actions as $k => $v)
99
<li>
10-
<a href="{{route($k)}}" >{{$v}}</a>
10+
<a href="{{$this->route($k)}}" >{{$v}}</a>
1111
</li>
1212
@endforeach
1313
@stop

resources/stubs/resources/views/demo/layout.blade.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<head>
33
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44
<title>@yield('title')</title>
5-
<!-- Стили из файла текущего приложения Demo/assets/css/backend/default.css -->
5+
<!-- Стили из файла текущего приложения Demo/assets/css/backend/default.css -->
66
<!-- полный путь domain.ru/PUBLIC_PATH/FRAMEWORK_PREFIX/assets/#APP_ID#/css/backend/default.css-->
7-
<link rel="stylesheet" href="{{asset('css/backend/default.css')}}">
7+
<link rel="stylesheet" href="{{$this->asset('css/backend/default.css')}}">
88
<!-- Получение файла с указанием приложения , например из другого модуля -->
9-
<link rel="stylesheet" href="{{asset('demo::css/mini.css')}}">
9+
<link rel="stylesheet" href="{{$this->asset('demo::css/mini.css')}}">
1010

1111
<!-- Получение ссылок на файлы js выполняется также -->
12-
<script type="text/javascript" src="{{asset('js/backend.js')}}"></script>
12+
<script type="text/javascript" src="{{$this->asset('js/backend.js')}}"></script>
1313
</head>
1414
<body>
1515
<div style="max-width: 1200px;margin: 0 auto;">
@@ -18,14 +18,17 @@
1818
<div class="col-sm-12 col-md-2">
1919
<h3>Меню</h3>
2020
<ul>
21+
<a href="{{$this->route('backend:'.$this->getAppId().'::test')}}">Test route</a>
22+
<a href="{{$this->route('backend:'.$this->getAppId().'::services_monitor')}}">Services test</a>
23+
<a href="{{$this->route($this->getAppId().'::home')}}">Frontend route</a>
2124
@section('sidebar')
2225

2326
@show
2427
</ul>
2528
</div>
2629
<div class="col-sm-12 col-md-10">
2730
<div class="row">
28-
<h1>{{app()->getAppName()}}</h1>
31+
<h1>{{$this->app()->getAppName()}}</h1>
2932
</div>
3033
<div class="section double-padded">
3134
<div id="controller-content">@yield('content')</div>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@extends('demo/layout')
2+
<!-- РАсширяем меню макета -->
3+
@section('sidebar')
4+
<a href="{{$this->route('backend:'.$this->getAppId().'::test')}}">Test route</a>
5+
<a href="{{$this->route($this->getAppId().'::home')}}">Frontend route</a>
6+
@parent
7+
@endsection
8+
9+
<p>Сервис Singleton: {{$singleton->getQuantityInstances()}} создано объектов</p>
10+
<p>Сервис Live: {{$live->getQuantityInstances()}} создано объектов</p>
11+
<p>Сервис Cloning: {{$cloning->getQuantityInstances()}} создано объектов, {{$cloning->getQuantityClones()}} клонирований</p>
12+
13+

resources/stubs/resources/views/frontend/layout.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<title>@yield('title')</title>
55
<!-- Стили из файла текущего приложения #APP_ID#/assets/css/app.css -->
66
<!-- полный путь domain.ru/PUBLIC_PATH/FRAMEWORK_PREFIX/assets/#APP_ID#/css/app.css -->
7-
<link rel="stylesheet" href="{{asset('css/app.css')}}">
7+
<link rel="stylesheet" href="{{$this->asset('css/app.css')}}">
88
<!-- Получение ссылок на файлы js выполняется также -->
9-
<script type="text/javascript" src="{{asset('js/app.js')}}"></script>
9+
<script type="text/javascript" src="{{$this->asset('js/app.js')}}"></script>
1010
</head>
1111
<body>
1212
<div style="max-width: 1000px;margin: 0 auto;">

resources/stubs/src/Bootstrap/Bootstrap.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
use Symbiotic\Core\{CoreInterface, BootstrapInterface};
66
use Symbiotic\Http\Kernel\{HttpKernel, HttpRunner, RoutingHandler};
7+
use Symbiotic\Container\DIContainerInterface;
78

89

910
class DummyClass implements BootstrapInterface
1011
{
1112

1213
/**
13-
* @param CoreInterface | \Symbiotic\Core | array $app = [
14+
* @param CoreInterface | array $core = [
1415
* // Сервисы доступные сразу
1516
*
16-
* 'config' => new \Symbiotic\Config(), {@used-by \_DS\config()}
17+
* 'config' => new \Symbiotic\Config(), {@used-by \_S\config()}
1718
* 'events' => new \Symbiotic\EventDispatcher(), //{@see \Symbiotic\Core\Bootstrap\EventBootstrap::bootstrap()}
1819
* 'listeners' => new \Symbiotic\Events\ListenerProvider(), //{@see \Symbiotic\Core\Bootstrap\EventBootstrap::bootstrap()}
1920
*
@@ -35,7 +36,7 @@ class DummyClass implements BootstrapInterface
3536
* 'route' => new \Symbiotic\Routing\RouteInterface(), //{@see \Symbiotic\Http\Kernel\RouteHandler::handle()}
3637
* ]
3738
*/
38-
public function bootstrap(CoreInterface $app): void
39+
public function bootstrap(DIContainerInterface $core): void
3940
{
4041
// тут можно добавить свои расширения ядра и сервисы
4142
}

resources/stubs/src/Bootstrap/BootstrapDemo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
use Symbiotic\Core\{CoreInterface, BootstrapInterface};
66
use Symbiotic\Http\Kernel\{HttpKernel, HttpRunner, RoutingHandler};
7-
7+
use Symbiotic\Container\DIContainerInterface;
88

99

1010
class DummyClass implements BootstrapInterface
1111
{
1212

1313
/**
14-
* @param CoreInterface|\Symbiotic\Core | array $app = [
14+
* @param CoreInterface| array $app = [
1515
* // Сервисы доступные сразу
1616
*
1717
* 'config' => new \Symbiotic\Config(),
@@ -21,7 +21,7 @@ class DummyClass implements BootstrapInterface
2121
* // Сервисы которых может еще не быть, но они доступны сразу после отработки всех бутстраперов
2222
*
2323
* 'apps' => new \Symbiotic\Appss\AppsRepository(), //{@see \Symbiotic\Apps\Bootstrap::bootstrap()}
24-
* 'cache' => new \Symbiotic\SimpleCache\Cache(), // может и не быть пакета
24+
* 'cache' => new \Symbiotic\Cache\Cache(), // может и не быть пакета
2525
* 'resources' => new \Symbiotic\Packages\Resources(), //{@see \Symbiotic\Packages\ResourcesBootstrap::bootstrap()}
2626
* 'http_factory' => new \Symbiotic\Http\PsrHttpFactory(), //{@see \Symbiotic\Http\Bootstrap::bootstrap()}
2727
*
@@ -36,7 +36,7 @@ class DummyClass implements BootstrapInterface
3636
* 'route' => new \Symbiotic\Routing\RouteInterface(), //{@see \Symbiotic\Http\Kernel\RouteHandler::handle()}
3737
* ]
3838
*/
39-
public function bootstrap(CoreInterface $app): void
39+
public function bootstrap(DIContainerInterface $core): void
4040
{
4141
// тут можно добавить свои расширения ядра и сервисы
4242
}

0 commit comments

Comments
 (0)