सभी का अभिवादन। मैं आपको
Regenix नामक अपनी परियोजना से
परिचित कराना चाहता
हूं ।

यह PHP भाषा के लिए एक नया MVC फ्रेमवर्क है, जिसके ढांचे के भीतर कई दिलचस्प और अद्वितीय विचारों को लागू किया जाता है जो कि आपको अन्य PHP फ्रेमवर्क में मिलने की संभावना नहीं है। प्रोजेक्ट प्ले से काफी प्रभावित था! ढांचा और जावा भाषा।
संक्षेप में,
Regenix एक ढांचा है जो त्रुटि नियंत्रण पर केंद्रित है, एक तंग ढांचा जो अक्सर एक ही कार्य के लिए कई समाधानों को स्वीकार नहीं करता है। यह एक बड़ी विकास टीम में स्थिरता सुनिश्चित करता है।
ढांचे के मुख्य गुण:
- क्लासिक एमवीसी आर्किटेक्चर
- अनावश्यक हेरफेर के बिना एक कोर पर कई परियोजनाओं के लिए समर्थन
- कॉन्फ़िगरेशन फ़ाइलों के आधार पर लचीली रूटिंग
- रनटाइम त्रुटियों का पता लगाने के लिए स्मार्ट कोड विश्लेषण
- अच्छा और विस्तृत त्रुटि आउटपुट
- संपत्ति, मॉड्यूल और संगीतकार निर्भरता के लिए निर्भरता प्रबंधक
- आलसी वर्ग लोडिंग, क्लास स्कैनर
- मॉडल के लिए Propel ORM को एकीकृत किया गया
- परियोजना प्रबंधन सी.एल.आई.
- साथ ही एक DI कंटेनर (Guice के समान), i18n, लॉगिंग, इसका अपना सरल टेम्पलेट इंजन और बहुत कुछ ...
ऐसा हुआ कि मैं एक कंपनी में काम करता हूं जहां वे अक्सर बैकएंड भाषा के रूप में जावा और फ्रंटएंड भाषा के रूप में पीएचपी का उपयोग करते हैं। PHP की दुनिया में बहुत सारे प्रसिद्ध ढांचे हैं, हालांकि, उनमें से कई कई मानदंडों के अनुसार हमारे अनुरूप नहीं हैं। इसके अलावा, जावा और प्ले में प्रोग्रामिंग के एक साल बाद, मुझे एक अलग विचारधारा की आदत हो गई और लगभग 8 महीने पहले अपने खाली समय में रेजेनिक्स का विकास शुरू किया।
आगे मैं फ्रेमवर्क की विशेषताओं के बारे में विस्तार से बात करूंगा ...
प्रविष्टि
Regenix को PHP 5.3+ और किसी भी वेब सर्वर (Nginx + FastCGI, Apache + mod_rewrite, आदि की आवश्यकता है)
पूरी तरह से ओपन सोर्स प्रोजेक्ट और GitHub'e (
https://github.com/dim-s/regenix ) पर होस्ट किया गया। अंग्रेजी में करंट डॉक्यूमेंटेशन, जो गिथब पर पाया जा सकता है, आंशिक रूप से उपलब्ध है (रूसी संस्करण पहले से पुराना है)।
MVC आर्किटेक्चर
Regenix क्लासिक MVC आर्किटेक्चर - मॉडल, दृश्य और नियंत्रकों को लागू करता है। एक नियंत्रक एक वर्ग है जिसे आधार वर्ग
regenix\mvc\Controller
से विरासत में मिला है, इसके सभी सार्वजनिक गैर-स्थिर तरीके क्रिया हो सकते हैं। URL को नियंत्रकों (रूटिंग) के तरीकों के साथ जोड़ने के लिए, एक विशेष कॉन्फ़िगरेशन फ़ाइल का उपयोग एक आसान-से-पढ़ने वाले सिंटैक्स के साथ किया जाता है जो कि प्ले फ्रेमवर्क से रूटिंग्स के समान है।
प्रतिनिधित्व (या टेम्प्लेट) एक विशेष टेम्पलेट इंजन के माध्यम से सरल वाक्यविन्यास के साथ लागू किया जाता है, जो कि आंशिक रूप से स्मार्टी के समान है। डिफ़ॉल्ट टेम्पलेट इंजन html वर्णों से बच जाता है।
मॉडल - एक तृतीय-पक्ष परियोजना का उपयोग करके कार्यान्वित - प्रोपेल ओआरएम, यह एक प्रसिद्ध और लोकप्रिय ओआरएम है, जो माइग्रेशन, सर्किट और मॉडल और कई डेटाबेस की पीढ़ी के लिए समर्थन के साथ है - पोस्टग्रेज, माईएसक्यूएल, आदि।
गुणवत्ता नियंत्रण - रनटाइम त्रुटियां
PHP एक गतिशील प्रोग्रामिंग भाषा है, जिसका अर्थ है कि अक्सर रनटाइम पर एक त्रुटि होती है। हालाँकि, Regenix इस समस्या को आंशिक रूप से हल करने में सक्षम था। फ्रेमवर्क में एक अंतर्निहित कोड विश्लेषक होता है जो कोड को निष्पादित करने से पहले कई त्रुटियों का पता लगाता है। उदाहरण के लिए, उपयोग में किसी भी गैर-वर्ग वर्ग का
उपयोग करें (फ्रेमवर्क में त्रुटि आउटपुट):

यह ध्यान रखना महत्वपूर्ण है कि रूपरेखा निष्पादन के समय इन त्रुटियों को नहीं ढूंढती है! परियोजना के सभी स्रोत कोड हर बार पृष्ठ खुलने के बाद (निश्चित रूप से यह DEV मोड में होता है) की जाँच की जाती है, और आप CLI से विश्लेषण भी चला सकते हैं। सामान्य तौर पर, फ्रेमवर्क निम्नलिखित प्रकार की त्रुटियों का समर्थन करता है:
- अस्तित्वहीन वर्ग - नए, उपयोग, कार्यों और विधियों के तर्क, कार्यान्वयन, विस्तार, आदि में।
- लागू होने की वैधता और विस्तार
- सिंटैक्स सत्यापन (पार्स त्रुटियां)
- उन स्थानों पर स्थिर विधियों के अस्तित्व की जाँच करना जहाँ उन्हें बुलाया जाता है
- पैकेज और कक्षा के नामकरण के लिए PSR-0 मानक का अनुपालन
- कुछ खतरनाक भाषा सुविधाओं को ब्लॉक करने की क्षमता - गोटो, ग्लोबल्स, या यहां तक कि नामित कार्यों की घोषणा
- सुपर-ग्लोबल चर ($ _GET, $ _POST, आदि) और कार्यों के एक सेट के उपयोग को अवरुद्ध करने की क्षमता
उसी समय, अपनी आवश्यकताओं को फिट करने के लिए अपने विश्लेषणकर्ताओं को लिखना संभव है। PHP के विभिन्न संस्करणों के साथ स्रोतों की संगतता की जांच करने के लिए analyzers लिखने की भी योजना है। यह सब कैसे संभव हुआ? इसके लिए, एक विशेष PHP पार्सर (
प्रोजेक्ट ) और क्लास स्कैनर का उपयोग किया जाता है, जिसकी मैं नीचे चर्चा करूंगा।
लोडर के बजाय क्लास स्कैनर
Regenix लोडिंग कक्षाओं के लिए एक गैर-मानक मॉडल का उपयोग करता है, यह अपने स्थान को खोजने के लिए वर्ग के नाम और उनके नाम स्थान का उपयोग नहीं करता है, जैसा कि अब PHP में करने के लिए प्रथागत है। क्लास स्कैनर उनमें कक्षाओं के लिए स्रोत फ़ोल्डर स्कैन करता है। इसका क्या मतलब है? फ्रेमवर्क के लिए, क्लास पथ (जावा से हैलो) की अवधारणाएं हैं, जब एक नया क्लास सोर्स (यानी स्रोत कोड वाले फ़ोल्डर) जोड़ते हैं, तो फ्रेमवर्क कैश के लिए सभी पाए गए क्लास की जानकारी को स्कैन और लिखता है।
कक्षा स्कैनर विशेषताएं:
- उनके नामकरण की परवाह किए बिना कक्षाएं ढूँढना
- आलसी लोडिंग कक्षाएं
- इसे लोड किए बिना कक्षा की जानकारी प्राप्त करने की क्षमता
- उदाहरण के लिए, किसी विशेष वर्ग के सभी वारिस (मॉड्यूल के लिए सुविधाजनक) पाने की क्षमता
मैं यह नोट करना चाहता हूं कि क्लास स्कैनर कैश में पाई गई सभी जानकारी को बचाता है और प्रदर्शन को बहुत प्रभावित नहीं करता है। इसलिए, उदाहरण के लिए, आप क्लास के सभी वंशजों को काफी त्वरित समय में पा सकते हैं (इस फ़ंक्शन की लागत एक मिलीसेकंड का एक अंश है):
यह दृष्टिकोण डेवलपर को कुछ एक्सटेंशन कक्षाओं को मैन्युअल रूप से पंजीकृत करने से मुक्त करता है, और यह काफी सुविधाजनक है।
रूटिंग, URL, सीएनसी
ढांचे की एक अन्य महत्वपूर्ण विशेषता मार्ग है। Regenix रूटिंग सेटिंग्स के लिए एक अलग फ़ाइल का उपयोग करता है, आइए ऐसी फ़ाइल के एक उदाहरण को देखें:
रोमिंग के लिए 4 नियम ऊपर वर्णित हैं, पहला कॉलम HTTP विधि (POST, GET, PUT, PATCH, आदि) है, दूसरा पृष्ठ का पथ है, जिसमें डायनेमिक भागों शामिल हो सकते हैं, तीसरा नियंत्रक का नाम है और इसकी विधि (के माध्यम से साझा की गई है) डॉट, आप नाम स्थान का उपयोग कर सकते हैं)। जैसा कि आप उदाहरण से देख सकते हैं, नियमित अभिव्यक्ति का समर्थन किया जाता है, और सभी गतिशील भागों को विधि तर्कों के रूप में नियंत्रक को स्थानांतरित किया जाता है, उदाहरण के लिए, ग्राहक नियंत्रक:
<?php namespace controllers; use regenix\mvc\Controller; class Clients extends Controller { public function detail($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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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){
-> { ... }
, (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. .