readme.ru.md русское описание
composer require symbiotic/full
PHP 최적화없이 호스팅에 대한 빠른 작업을 위해 하나의 파일을 공생/풀-싱글로 구축하십시오.
이 프레임 워크는 독립적 인 소형 애플리케이션의 다른 CMS 및 프레임 워크에 대한 통합을 단순화하고 작곡가 패키지의 기능을 확장하기 위해 만들어졌습니다.
이데올로기는 다른 프레임 워크와의 협력 및 추가 기능의 편리한 통합을위한 소규모 애플리케이션의 별도의 생태계입니다.
유용한 기능을 제공하고 자체 비즈니스 로직을 가지고 있으며 때로는 별도의 웹 인터페이스가있는 많은 패키지와 별도로 작성된 응용 프로그램이 있습니다.
Laravel 패키지, Symfony 번들, 플러그인 및 애드온 형태의 다양한 CMS에서는 모두 다른 프레임 워크 또는 CMS를 통합하기 위해 Laravel을 위해 작성된 패키지가 대부분의 경우 문제가되고 경우에 따라 프레임 워크에 대한 특정 종속성으로 인해 불가능합니다.
응용 프로그램 개발자 자체는 각 프레임 워크 및 CMS에 대한 적응을 작성해야하며, 이는 많은 문제를 일으키고 모든 생태계를 다루지 않습니다.
또한 이러한 응용 프로그램은 시스템에 다양한 통합을 수행해야합니다.
이러한 응용 프로그램에는 다음이 포함됩니다.
이 프레임 워크는 많은 양의 응용 프로그램과 함께 작동하고 기본 프레임 워크의 하위 시스템으로 작동하도록 최적화되었습니다.
각 응용 프로그램은 Composer.json 파일에 직접 추가 설명이있는 작곡가 패키지입니다.
// If you are already using the framework, then you need to enable the symbiosis mode in the config
// In this mode of operation, the framework will respond only to requests related to it and will not block work for "other" requests.
$ config [ ' symbiosis ' ] = true ;프레임 워크는 작곡가에서 index.php에 직접 첨부됩니다.
$ basePath = dirname ( __DIR__ ); // root folder of the project
include_once $ basePath . ' /vendor/autoload.php ' ;
include $ basePath . ' /vendor/symbiotic/full/src/symbiotic.php ' ;
// Then the initialization code and the work of another framework can go on when the symbiosis mode is enabled...
//.... $laravel->handle();
$ basePath = dirname ( __DIR__ ); // root folder of the project
include_once $ basePath . ' /vendor/autoload.php ' ;
$ config = include $ basePath . ' /vendor/symbiotic/full/src/config.sample.php ' ;
//.. Redefining the configuration array
// Basic construction of the Core container
$ core = new Symbiotic Core Core ( $ config );
/**
* When installing the symbiotic/full package, a cached container is available
* Initialization in this case occurs through the Builder:
*/
$ cache = new Symbiotic Cache FilesystemCache ( $ config [ ' storage_path ' ] . ' /cache/core ' );
$ core = ( new Symbiotic Core ContainerBuilder ( $ cache ))
-> buildCore ( $ config );
// Starting request processing
$ core -> run ();
// Then the initialization code and the work of another framework can go on when the symbiosis mode is enabled...
// $laravel->handle(); Composer.json 파일의 애플리케이션 설명의 최소 체계 :
{
"name" : " vendor/package " ,
"require" : {
// ...
},
"autoload" : {
// ...
},
"extra" : {
"symbiotic" : {
"app" : {
// Application ID
"id" : " my_package_id " ,
// Routing provider
"routing" : " \ MyVendor \ MySuperPackage \ Routing " ,
// Basic namespace for application controllers
"controllers_namespace" : " \ MyVendor \ MySuperPackage \ Http \ Controllers "
}
}
}
}
{
"name" : " vendor/package " ,
"require" : {
// ...
},
"autoload" : {
// ...
},
// Adding a description of the package for the symbiotic
"extra" : {
"symbiotic" : {
// Package ID
"id" : " my_super_package " ,
// Application description, the package may not have an application section
"app" : {
// Application ID, specified without the prefix of the parent application
"id" : " image_optimizer " ,
// ID of the parent application (optional)
"parent_app" : " media " ,
// Application name, used in the application list and menu
"name" : " Media images optimizer " ,
// Routing class (optional)
"routing" : " \ MyVendor \ MySuperPackage \ Routing " ,
// Basic namespace for controllers (optional)
"controllers_namespace" : " \ Symbiotic \ Develop \ Controllers " ,
// Application providers (optional)
"providers" : [
" MyVendor \ MySuperPackage \ Providers \ AppProvider "
],
// Application container class (optional)
// Heir from \Symbiotic\App\Application
"app_class" : " MyVendor \ MySuperPackage \ MyAppContainer "
},
// Folder with static relative to the package root (will be accessible via the web) (optional)
"public_path" : " assets " ,
// Folder with templates and other resources (not accessible via the Web) (optional)
"resources_path" : " my_resources " ,
// Framework Core Extensions
// Bootstrappers (optional)
"bootstrappers" : [
" MyVendor \ MySuperPackage \ CoreBootstrap "
],
// Providers (optional)
"providers" : [
" MyVendor \ MySuperPackage \ MyDbProvider "
],
// Exclusion of kernel providers (optional)
"providers_exclude" : [
// Exclusion of providers from downloading
// For example, with two packages of the same library, it allows you to exclude unnecessary
],
// Event subscribers (optional)
"events" : {
"handlers" : {
"Symbiotic \ Form \ FormBuilder" : " MyVendor \ MyApp \ Events \ FilesystemFieldHandler " ,
"Symbiotic \ Settings \ FieldTypesRepository" : " MyVendor \ MyApp \ Events \ FieldsHandler " ,
"Symbiotic \ UIBackend \ Events \ MainSidebar" : " MyVendor \ MyApp \ Events \ Menu "
}
},
//Package settings fields (optional)
"settings_fields" : [
{
"title" : " Fields group 1 " ,
"name" : " group_1 " ,
"collapsed" : 0 ,
"type" : " group " ,
"fields" : [
{
"label" : " Field 1 " ,
"name" : " filed_name_1 " ,
"type" : " text "
},
{
"label" : " Select 1 " ,
"name" : " select_1 " ,
"type" : " select " ,
"variants" : {
"value1" : " title1 " ,
"value12" : " title2 "
}
},
{
"label" : " Boolean checkbox " ,
"name" : " debug " ,
"description" : " Debug mode " ,
"type" : " boolean "
}
]
}
],
// Default settings (optional)
"settings" : {
"filed_name_1" : " demo_value " ,
"select_1" : " value12 " ,
"debug" : " 0 "
},
// Console commands (optional)
"commands" : {
"worker" : " MyVendor \ MyApp \ Commands \ Worker " ,
"stop" : " MyVendor \ MyApp \ Commands \ Stop "
}
}
}
}
애플리케이션을 구성하면 정적 및 리소스의 경로를 지정할 수 없으면 기본 경로가 정의됩니다. :
템플릿은 항상 리소스 폴더의 /view/ 디렉토리에 있어야합니다!
프레임 워크의 모든 패키지는 여러 논리적 범주로 나눌 수 있습니다.
모든 패키지는 위의 모든 것을 결합 할 수 있습니다.
명확한 필수 구조는 없으므로 어떤 사람도 사용할 수 있습니다. Composer Package (Library)를 기반으로 응용 프로그램을 작성하는 경우 혼란을 피하기 위해 src/Symbiotic 폴더에 응용 프로그램의 모든 코드를 넣는 것이 좋습니다.
vendor/
-/my_vendor
-/my_package_name
-/assets - Public files
-/js
-/css
-/...
-/resources - Resources
-/views - View templates
-/...
-/src - php code
-/Http
-/Cоntrollers
-/...
-/Services
...
-/Routing.php
-/composer.json