Regenix:PHP用の新しい非標準MVCフレームワーク

すべてにご挨拶。 Regenixと呼ばれる私のプロジェクトを紹介したいと思います。

画像



これはPHP言語用の新しいMVCフレームワークであり、そのフレームワーク内には、他のPHPフレームワークでは出会えそうにない興味深いユニークなアイデアがいくつか実装されています。 このプロジェクトは、Play! フレームワークとJava言語。



簡単に言えば、 Regenixはエラー制御に焦点を当てたフレームワークであり、単一のタスクに対して多くのソリューションを受け入れないことが多いタイトなフレームワークです。 これにより、大規模な開発チームの一貫性が確保されます。



フレームワークの主な品質:







そのため、私は、バックエンド言語としてJavaを、フロントエンド言語としてPHPをよく使用する会社で働いています。 PHPの世界には多くの有名なフレームワークがありますが、多くの基準に従って、それらの多くは私たちに適合しません。 さらに、JavaとPlayで1年間プログラミングを行った後、私は別のイデオロギーに慣れ、約8か月前の空き時間にRegenixの開発を開始しました。



次に、フレームワークの機能について詳しく説明します...



エントリー



RegenixにはPHP 5.3以降が必要であり、すべてのWebサーバー(Nginx + FastCGI、Apache + mod_rewriteなど)は

完全にオープンソースのプロジェクトであり、GitHub'e( https://github.com/dim-s/regenix )でホストされています 。 githubにある実際の英語のドキュメントも部分的に入手可能です(ロシア語版はすでに古くなっています)。



MVCアーキテクチャ



Regenixは、モデル、ビュー、コントローラーなどの古典的なMVCアーキテクチャを実装しています。 コントローラーは、基本クラスregenix\mvc\Controller



から継承されたクラスであり、そのパブリックな非静的メソッドはすべてアクションにすることができます。 URLをコントローラーのメソッド(ルーティング)に関連付けるには、Playフレームワークからのルーティングに非常によく似た読みやすい構文を持つ特別な構成ファイルが使用されます。



表現(またはテンプレート)は、Smartyに部分的に類似した単純な構文を持つ特別なテンプレートエンジンを介して実装されます。 デフォルトのテンプレートエンジンは、html文字をエスケープします。



モデル-サードパーティのプロジェクトを使用して実装-Propel ORM、これはよく知られ人気のあるORMであり、移行、回路とモデルの生成、いくつかのデータベース-Postgres、MySQLなどをサポートします。



品質管理-ランタイムエラー



PHPは動的なプログラミング言語です。つまり、多くの場合、実行時にエラーが発生します。 ただし、Regenixはこの問題を部分的に解決できました。 フレームワークには、コード自体が実行される前に多くのエラーを検出する組み込みのコードアナライザーがあります。 たとえば、使用中の存在しないクラスを使用する (フレームワークでのエラー出力):







フレームワークは、実行時にこれらのエラーを見つけられないことに注意することが重要です! プロジェクトのすべてのソースコードはページが開かれるたびにチェックされ(もちろん、これはDEVモードで発生します)、CLIから分析を実行することもできます。 一般に、フレームワークは次のタイプのエラーをサポートします。





同時に、ニーズに合わせてアナライザーを作成することもできます。 また、異なるバージョンのPHPとソースの互換性を確認するためのアナライザーを作成する予定です。 これはどのようにして可能になったのでしょうか? このために、特別なPHPパーサー( プロジェクト )とクラススキャナーが使用されます。これについては、以下で説明します。



ローダーではなくクラススキャナー



Regenixは、クラスのロードに非標準モデルを使用します。現在PHPで行われているように、クラス名とその名前空間を使用して場所を見つけることはありません。 クラススキャナーは、ソースフォルダー内のクラスをスキャンします。 これはどういう意味ですか? フレームワークには、クラスパス(Javaのハロー)の概念があり、新しいクラスソース(つまり、ソースコードのあるフォルダー)を追加すると、フレームワークは検索されたすべてのクラス情報をスキャンしてキャッシュに書き込みます。



クラススキャナーの機能:



  1. 名前に関係なくクラスを見つける
  2. 遅延読み込みクラス
  3. クラス情報をロードせずに取得する機能
  4. たとえば、特定のクラスのすべての相続人を取得する機能(モジュールに便利)




Class Scannerはキャッシュにあるすべての情報を保存し、パフォーマンスに大きな影響を与えないことに注意してください。 そのため、たとえば、クラスのすべての子孫をかなり短時間で見つけることができます(この関数のコストは1ミリ秒の何分の1かです)。



 //   ,      $meta = ClassScanner::find('regenix\libs\RegenixTemplateTag'); foreach($meta->getChildrensAll() as $class){ if (!$class->isAbstract()){ $instance = $class->newInstance(); $this->registerTag($instance); } }
      
      





このアプローチにより、開発者はいくつかの拡張クラスを手動で登録する必要がなくなり、非常に便利です。



ルーティング、URL、CNC



フレームワークのもう1つの重要な機能はルーティングです。 Regenixはルーティング設定に別のファイルを使用します。そのようなファイルの例を見てみましょう。



 # comment GET / Application.index GET /{action} Application.{action} POST /api/{method} api.Api.{method} * /clients/{id<[0-9]+>} Clients.detail
      
      







上記のローミングの4つのルールについて説明します。最初の列はHTTPメソッド(POST、GET、PUT、PATCHなど)、2番目はページへのパスです。これは動的な部分で構成でき、3番目はコントローラーの名前とメソッド(ドット、名前空間を使用できます)。 例からわかるように、正規表現がサポートされており、すべての動的な部分はメソッド引数の形式でコントローラーに転送されます。たとえば、Clientsコントローラーです。



 <?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. .








し、それらを/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. .




  1. /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. .




  2. /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. .




  3. /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. .




  4. /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. .







All Articles