regenix\mvc\Controller
, all of its public non-static methods can be actions (actions). To associate URLs with controller methods (routing), a special configuration file is used with easy-to-read syntax that is very similar to the routings from the Play framework. // , $meta = ClassScanner::find('regenix\libs\RegenixTemplateTag'); foreach($meta->getChildrensAll() as $class){ if (!$class->isAbstract()){ $instance = $class->newInstance(); $this->registerTag($instance); } }
# comment GET / Application.index GET /{action} Application.{action} POST /api/{method} api.Api.{method} * /clients/{id<[0-9]+>} Clients.detail
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { public function detail($id){ // $id } }
/conf/routes/.route. , REST , URL. , conf/routes/resource.route :
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
folder /conf/routes/.route. , REST , URL. , conf/routes/resource.route :
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
/conf/routes/.route. , REST , URL. , conf/routes/resource.route
:
GET / .index POST /create .create GET /{id} .show PUT /{id}/update .update DELETE /{id}/destroy .destroy
, :
# PostApi CommentApi * /posts/ resource:PostApi * /comments/ resource:CommentApi
resource
resource.route
.
Regenix ( ).
Regenix regenix\mvc\Controller
. : onBefore, onAfter, onFinally, onException, onHttpException, onReturn, onBindParams
. . , DI. :
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { private $service; public function __construct(MyService $service){ // DI $this->service = $service; } public function index(){ .... $this->put("var_name_for_template", $value); // $this->render(); // , "Clients/index.html" } public function detail($id){ // $id - $_GET // : $this->request, $this->response, $this->body, $this->session, $this->flash, etc. } }
render*
.
, , return
.
assets
. , , , . Regenix assets, . conf/deps.json (jQuery, Angular, etc) , regenix deps update
. deps.json:
{ "repository": "github:dim-s/regenix-repository/master", "assets": { "jquery": {"version": "1.*"}, "bootstrap": {"version": "2.*|3.*"} }, "modules": { }, "composer": { "require": { } } }
jQuery Bootstrap ( Bootstrap jQuery). , github, , ( ). , , . , Composer, src/vendor
.
assets- , :
<html> <head> {html.asset 'dep:jquery'} <!-- jquery --> {html.asset 'dep:bootstrap'} <!-- ... --> </head> </html>
. !
Regenix PHP , . Regenix:
HTML - - PHP - <?= ... ?>
-> { ... }
, (html php), include- (, )
:
<!DOCTYPE HTML> <html> <head> <title>{get 'title'}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {html.asset 'dep:jquery'} {html.asset 'dep:bootstrap'} {html.asset 'css/main.css'} {html.asset 'js/main.js'} </head> <body> <h1 class="title">{get 'subTitle'}</h1> <div id="content"> {content} </div> <div class="language"> <a href="{path 'Application.index', _lang: 'ru'}">Russian Version</a> / <a href="{path 'Application.index'}">Default Version</a> </div> {debug.info} </body> </html>
, Regenix. , , , .
- . Regenix git, . Regenix git-bash:
cd <root_of_your_server> git clone https://github.com/dim-s/regenix.git ./ git submodule init git submodule update
, : framework - , apps - . . - . CLI :
cd <root_of_your_server> # unix chmod +x install.sh ./install.sh #### regenix new
regenix new
apps, localhost/[name]
.
Regenix , . , , , . Regenix.
/apps/
. :
apps/<appName>/ * src/* # src/controllers/ # src/models/ # src/views/ # src/* # conf/ # conf/application.conf # conf/route # conf/deps.json # assets, composer conf/analyzer.conf # conf/orm/* # Propel ORM assets/ # css, js, images vendor/ # composer Bootstrap.php # bootstrap Bootstrap,
( root ) :
/public/<appName>/* # upload /logs/ # /assets/ # assets /modules/ #
. , , 90% .
Github: https://github.com/dim-s/regenix .
: https://github.com/dim-s/regenix-documentation/
PS (vendors) - Symfony (Console, Process), Doctrine ( Cache), PHP-Parser, KCaptcha, Imagine, Propel ORM. .
Source: https://habr.com/ru/post/196604/
All Articles