From 6e65ff852fcead5adf41dabb52be512e67574e1f Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 14:57:36 +0300 Subject: [PATCH 01/22] Add files via upload --- docs/guide-ar/start-workflow.md | 102 ++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs/guide-ar/start-workflow.md diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md new file mode 100644 index 0000000000..454b07e2de --- /dev/null +++ b/docs/guide-ar/start-workflow.md @@ -0,0 +1,102 @@ +Running Applications +==================== + +After installing Yii, you have a working Yii application that can be accessed via +the URL `http://hostname/basic/web/index.php` or `http://hostname/index.php`, depending +upon your configuration. This section will introduce the application's built-in functionality, +how the code is organized, and how the application handles requests in general. + +> Info: For simplicity, throughout this "Getting Started" tutorial, it's assumed that you have set `basic/web` + as the document root of your Web server, and configured the URL for accessing + your application to be `http://hostname/index.php` or something similar. + For your needs, please adjust the URLs in our descriptions accordingly. + +Note that unlike framework itself, after project template is installed it's all yours. You're free to add or delete +code and overall modify it as you need. + + +Functionality +------------- + +The basic application installed contains four pages: + +* the homepage, displayed when you access the URL `http://hostname/index.php`, +* the "About" page, +* the "Contact" page, which displays a contact form that allows end users to contact you via email, +* and the "Login" page, which displays a login form that can be used to authenticate end users. Try logging in + with "admin/admin", and you will find the "Login" main menu item will change to "Logout". + +These pages share a common header and footer. The header contains a main menu bar to allow navigation +among different pages. + +You should also see a toolbar at the bottom of the browser window. +This is a useful [debugger tool](https://github.com/yiisoft/yii2-debug/blob/master/docs/guide/README.md) provided by Yii to record and display a lot of debugging information, such as log messages, response statuses, the database queries run, and so on. + +Additionally to the web application, there is a console script called `yii`, which is located in the applications base directory. +This script can be used to run background and maintenance tasks for the application, which are described +in the [Console Application Section](tutorial-console.md). + + +Application Structure +--------------------- + +The most important directories and files in your application are (assuming the application's root directory is `basic`): + +``` +basic/ application base path + composer.json used by Composer, describes package information + config/ contains application and other configurations + console.php the console application configuration + web.php the Web application configuration + commands/ contains console command classes + controllers/ contains controller classes + models/ contains model classes + runtime/ contains files generated by Yii during runtime, such as logs and cache files + vendor/ contains the installed Composer packages, including the Yii framework itself + views/ contains view files + web/ application Web root, contains Web accessible files + assets/ contains published asset files (javascript and css) by Yii + index.php the entry (or bootstrap) script for the application + yii the Yii console command execution script +``` + +In general, the files in the application can be divided into two types: those under `basic/web` and those +under other directories. The former can be directly accessed via HTTP (i.e., in a browser), while the latter can not and should not be. + +Yii implements the [model-view-controller (MVC)](http://wikipedia.org/wiki/Model-view-controller) architectural pattern, +which is reflected in the above directory organization. The `models` directory contains all [model classes](structure-models.md), +the `views` directory contains all [view scripts](structure-views.md), and the `controllers` directory contains +all [controller classes](structure-controllers.md). + +The following diagram shows the static structure of an application. + +![Static Structure of Application](images/application-structure.png) + +Each application has an entry script `web/index.php` which is the only Web accessible PHP script in the application. +The entry script takes an incoming request and creates an [application](structure-applications.md) instance to handle it. +The [application](structure-applications.md) resolves the request with the help of its [components](concept-components.md), +and dispatches the request to the MVC elements. [Widgets](structure-widgets.md) are used in the [views](structure-views.md) +to help build complex and dynamic user interface elements. + + +Request Lifecycle +----------------- + +The following diagram shows how an application handles a request. + +![Request Lifecycle](images/request-lifecycle.png) + +1. A user makes a request to the [entry script](structure-entry-scripts.md) `web/index.php`. +2. The entry script loads the application [configuration](concept-configurations.md) and creates + an [application](structure-applications.md) instance to handle the request. +3. The application resolves the requested [route](runtime-routing.md) with the help of + the [request](runtime-requests.md) application component. +4. The application creates a [controller](structure-controllers.md) instance to handle the request. +5. The controller creates an [action](structure-controllers.md) instance and performs the filters for the action. +6. If any filter fails, the action is cancelled. +7. If all filters pass, the action is executed. +8. The action loads some data models, possibly from a database. +9. The action renders a view, providing it with the data models. +10. The rendered result is returned to the [response](runtime-responses.md) application component. +11. The response component sends the rendered result to the user's browser. + From 6367b02e6dfd2c5faff7894f94f9aef5a17c88ba Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 15:05:07 +0300 Subject: [PATCH 02/22] Update README.md --- docs/guide-ar/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-ar/README.md b/docs/guide-ar/README.md index 657169ef13..79668a50e2 100644 --- a/docs/guide-ar/README.md +++ b/docs/guide-ar/README.md @@ -20,7 +20,7 @@ * [ماذا يجب أن تعرف عن بيئة العمل](start-prerequisites.md) * [تثبيت ال Yii](start-installation.md) -* [تشغيل وتطبيق بيئة العمل](../guide/start-workflow.md) +* [تشغيل وتطبيق بيئة العمل](guide/start-workflow.md) * [قل مرحبا - المشروع الأول](../guide/start-hello.md) * [العمل مع ال forms](../guide/start-forms.md) * [العمل مع قواعد البيانات](../guide/start-databases.md) From 88f4556f9ce500eeddf90d749d571ba8482963a8 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 15:05:33 +0300 Subject: [PATCH 03/22] Update README.md --- docs/guide-ar/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-ar/README.md b/docs/guide-ar/README.md index 79668a50e2..221a0fef68 100644 --- a/docs/guide-ar/README.md +++ b/docs/guide-ar/README.md @@ -20,7 +20,7 @@ * [ماذا يجب أن تعرف عن بيئة العمل](start-prerequisites.md) * [تثبيت ال Yii](start-installation.md) -* [تشغيل وتطبيق بيئة العمل](guide/start-workflow.md) +* [تشغيل وتطبيق بيئة العمل](start-workflow.md) * [قل مرحبا - المشروع الأول](../guide/start-hello.md) * [العمل مع ال forms](../guide/start-forms.md) * [العمل مع قواعد البيانات](../guide/start-databases.md) From b0aa74d46679ff65aed18c135b7a150368a65dd8 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 15:53:29 +0300 Subject: [PATCH 04/22] Update README.md --- docs/guide-ar/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-ar/README.md b/docs/guide-ar/README.md index 221a0fef68..10563514cf 100644 --- a/docs/guide-ar/README.md +++ b/docs/guide-ar/README.md @@ -20,7 +20,7 @@ * [ماذا يجب أن تعرف عن بيئة العمل](start-prerequisites.md) * [تثبيت ال Yii](start-installation.md) -* [تشغيل وتطبيق بيئة العمل](start-workflow.md) +* [تشغيل التطبيقات - Running Applications](start-workflow.md) * [قل مرحبا - المشروع الأول](../guide/start-hello.md) * [العمل مع ال forms](../guide/start-forms.md) * [العمل مع قواعد البيانات](../guide/start-databases.md) From f2b390e599f5e9c40fb1f7269706ac58b5bc3326 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 15:54:46 +0300 Subject: [PATCH 05/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 454b07e2de..52c7063662 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -1,16 +1,16 @@ -Running Applications -==================== +#
تشغيل التطبيقات
-After installing Yii, you have a working Yii application that can be accessed via -the URL `http://hostname/basic/web/index.php` or `http://hostname/index.php`, depending -upon your configuration. This section will introduce the application's built-in functionality, -how the code is organized, and how the application handles requests in general. +

+بعد تثبيت ال Yii، سيكون لديك تطبيق Yii جاهز للعمل عليه ويمكن الوصول إليه عبر +الرابط التالي: http://hostname/basic/web/index.php أو http://hostname/index.php إعتمادا على الإعدادات +الخاصة بك(إعدادت ال web server). في هذا الجزء سنستعرض الوظائف ال built-in الموجودة في التطبيق الإفتراضي لإطار العمل Yii، وكيف يقوم بتنظيم الشيفرة البرمجية، وكيف يعالج (handling) هذا التطبيق الطلبات (requests) بشكل عام. +

+ +

+معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: http://hostname/index.php أو ما شابه ذلك. +اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذه البرنامج التعليمي، يرضى ضبط ال Url كما هو في الوصف الخاص بنا في هذه الصفحة. تثبيت ال Yii +

-> Info: For simplicity, throughout this "Getting Started" tutorial, it's assumed that you have set `basic/web` - as the document root of your Web server, and configured the URL for accessing - your application to be `http://hostname/index.php` or something similar. - For your needs, please adjust the URLs in our descriptions accordingly. - Note that unlike framework itself, after project template is installed it's all yours. You're free to add or delete code and overall modify it as you need. From 3e2abbd78a36cb226dcc7ae945474a0276f8e3e4 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 15:57:51 +0300 Subject: [PATCH 06/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 52c7063662..a578c5515c 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -6,10 +6,11 @@ الخاصة بك(إعدادت ال web server). في هذا الجزء سنستعرض الوظائف ال built-in الموجودة في التطبيق الإفتراضي لإطار العمل Yii، وكيف يقوم بتنظيم الشيفرة البرمجية، وكيف يعالج (handling) هذا التطبيق الطلبات (requests) بشكل عام.

-

-معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: http://hostname/index.php أو ما شابه ذلك. -اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذه البرنامج التعليمي، يرضى ضبط ال Url كما هو في الوصف الخاص بنا في هذه الصفحة. تثبيت ال Yii -

+

+ معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: http://hostname/index.php أو ما شابه ذلك. +اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذه البرنامج التعليمي، يرضى ضبط ال Url كما هو في الوصف الخاص بنا في هذه الصفحة. +يمكنك معرفة الضبط الخاص بال Web server من هنا: تثبيت ال Yii +

Note that unlike framework itself, after project template is installed it's all yours. You're free to add or delete code and overall modify it as you need. From 63bcbd258330f406ef36bc4afe6ac0ee3ce820f0 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 16:00:17 +0300 Subject: [PATCH 07/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index a578c5515c..c90e5593cd 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -8,7 +8,7 @@

معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: http://hostname/index.php أو ما شابه ذلك. -اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذه البرنامج التعليمي، يرضى ضبط ال Url كما هو في الوصف الخاص بنا في هذه الصفحة. +اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذه البرنامج التعليمي، يرجى ضبط ال Url كما هو موضح في هذه الصفحة. يمكنك معرفة الضبط الخاص بال Web server من هنا: تثبيت ال Yii

From e8ad5c548e1e665a53f04839d5398448262feef0 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 16:07:05 +0300 Subject: [PATCH 08/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index c90e5593cd..8543c5b10d 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -8,7 +8,7 @@

معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: http://hostname/index.php أو ما شابه ذلك. -اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذه البرنامج التعليمي، يرجى ضبط ال Url كما هو موضح في هذه الصفحة. +اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذا البرنامج التعليمي، يرجى ضبط ال Url كما هو موضح في هذه الصفحة. يمكنك معرفة الضبط الخاص بال Web server من هنا: تثبيت ال Yii

From 704c497c0b795548b4ac92ee32e2cc32b1f7fc15 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 16:11:33 +0300 Subject: [PATCH 09/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 8543c5b10d..4f3376c29b 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -12,8 +12,9 @@ يمكنك معرفة الضبط الخاص بال Web server من هنا: تثبيت ال Yii

-Note that unlike framework itself, after project template is installed it's all yours. You're free to add or delete -code and overall modify it as you need. +

+ملاحظة: بخلاف إطار العمل نفسه(Yii framework)، بعد تثبيت ال template الخاص بالمشروع، يكون كل شيء في هذا التطبيق يخصك أنت، بحيث تملك الحرية في إضافة أو حذف أو تعديل كل ما تحتاج اليه. +

Functionality From e65b9c2d121225630378fcd702044c242d167a04 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 17:05:01 +0300 Subject: [PATCH 10/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 4f3376c29b..b3e1c7a1dd 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -3,7 +3,7 @@

بعد تثبيت ال Yii، سيكون لديك تطبيق Yii جاهز للعمل عليه ويمكن الوصول إليه عبر الرابط التالي: http://hostname/basic/web/index.php أو http://hostname/index.php إعتمادا على الإعدادات -الخاصة بك(إعدادت ال web server). في هذا الجزء سنستعرض الوظائف ال built-in الموجودة في التطبيق الإفتراضي لإطار العمل Yii، وكيف يقوم بتنظيم الشيفرة البرمجية، وكيف يعالج (handling) هذا التطبيق الطلبات (requests) بشكل عام. +الخاصة بك (إعدادت ال web server). في هذا الجزء سنستعرض الوظائف ال built-in الموجودة في التطبيق الإفتراضي لإطار العمل Yii، وكيف يقوم بتنظيم الشيفرة البرمجية، وكيف يعالج (handling) هذا التطبيق الطلبات (requests) بشكل عام.

@@ -17,16 +17,18 @@

-Functionality -------------- +##
خصائص / وظائف التطبيق المثبت - Functionality
-The basic application installed contains four pages: +

+ يحتوي ال Basic ِApplication Template الذي قمنا بتثبيته على أربع صفحات: +

-* the homepage, displayed when you access the URL `http://hostname/index.php`, -* the "About" page, -* the "Contact" page, which displays a contact form that allows end users to contact you via email, -* and the "Login" page, which displays a login form that can be used to authenticate end users. Try logging in - with "admin/admin", and you will find the "Login" main menu item will change to "Logout". +
    +
  • الصفحة الرئيسية(Homepage): يتم عرض هذه الصفحة من خلال الرابط التالي http://hostname/index.php
  • +
  • صفحة من نحن(About)
  • +
  • صفحة اتصل بنا (Contact): في هذه الصفحة يتم عرض form يسمح للأعشاء بالإتصال بك من خلال البريد الإلكتروني.
  • +
  • صفحة تسجيل الدخول (Login): في هذه الصفحة يتم عرض form يسمح للأعضاء بالحصول على الإذن لإستخدام الخصائص التي لا يجوز لغيرهم من الوصول اليها، قم بتجربة تسجيل الدخول من خلال استخدام admin/admin ولاحظ أن كلمة "Login" ستختفي من القائمة الرئيسية وستظهر محلها الكلمة "Logout"
  • +
These pages share a common header and footer. The header contains a main menu bar to allow navigation among different pages. From 2b987278ee43c5ffaf99c456bd7a1e66795c6fbd Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 17:23:23 +0300 Subject: [PATCH 11/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index b3e1c7a1dd..f3e3936a76 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -30,11 +30,14 @@
  • صفحة تسجيل الدخول (Login): في هذه الصفحة يتم عرض form يسمح للأعضاء بالحصول على الإذن لإستخدام الخصائص التي لا يجوز لغيرهم من الوصول اليها، قم بتجربة تسجيل الدخول من خلال استخدام admin/admin ولاحظ أن كلمة "Login" ستختفي من القائمة الرئيسية وستظهر محلها الكلمة "Logout"
  • -These pages share a common header and footer. The header contains a main menu bar to allow navigation -among different pages. +

    +هذه الصفحات تشترك بامتلاكها common header and footer -الترويسة أعلى الصفحة، والذيل أسفل الصفحة-. ويحتوي ال header على القائمة الرئيسية (main menu) والتي بدورها تسمح لك بالتنقل بين الصفحات المختلفة. +

    -You should also see a toolbar at the bottom of the browser window. -This is a useful [debugger tool](https://github.com/yiisoft/yii2-debug/blob/master/docs/guide/README.md) provided by Yii to record and display a lot of debugging information, such as log messages, response statuses, the database queries run, and so on. +

    + أيضا، يجب عليك أن تنظر الى ال toolbar الموجود في أسفل نافذة المتصفح. +هذه أداة مفيدة [debugger tool] (https://github.com/yiisoft/yii2-debug/blob/master/docs/guide/README.md) مقدمة من Yii لتسجيل وعرض الكثير من المعلومات وتصحيح الأخطاء، مثل log messages, response statuses, the database queries run وما إلى ذلك. +

    Additionally to the web application, there is a console script called `yii`, which is located in the applications base directory. This script can be used to run background and maintenance tasks for the application, which are described From ccf56c026dd0aa32b47e369b20a9e1abc3b893fa Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 17:26:51 +0300 Subject: [PATCH 12/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index f3e3936a76..bfcf5bd7db 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -35,8 +35,7 @@

    - أيضا، يجب عليك أن تنظر الى ال toolbar الموجود في أسفل نافذة المتصفح. -هذه أداة مفيدة [debugger tool] (https://github.com/yiisoft/yii2-debug/blob/master/docs/guide/README.md) مقدمة من Yii لتسجيل وعرض الكثير من المعلومات وتصحيح الأخطاء، مثل log messages, response statuses, the database queries run وما إلى ذلك. + أيضا، يجب عليك أن تنظر الى ال toolbar الموجود في أسفل نافذة المتصفح. ال debugger tool هذه تعتبر كأداة مفيدة مقدمة من ال Yii لتسجيل وعرض الكثير من المعلومات وتصحيح الأخطاء، مثل log messages, response statuses, the database queries run وما إلى ذلك.

    Additionally to the web application, there is a console script called `yii`, which is located in the applications base directory. From 54c6e43dda4add3a3d1d9355293c8e7525ab43df Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 17:53:21 +0300 Subject: [PATCH 13/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index bfcf5bd7db..0b36bf6c91 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -38,9 +38,11 @@ أيضا، يجب عليك أن تنظر الى ال toolbar الموجود في أسفل نافذة المتصفح. ال debugger tool هذه تعتبر كأداة مفيدة مقدمة من ال Yii لتسجيل وعرض الكثير من المعلومات وتصحيح الأخطاء، مثل log messages, response statuses, the database queries run وما إلى ذلك.

    -Additionally to the web application, there is a console script called `yii`, which is located in the applications base directory. -This script can be used to run background and maintenance tasks for the application, which are described -in the [Console Application Section](tutorial-console.md). +

    + بالإضافة إلى ال web application، يوجد هناك "console script" يسمى ب yii، والذي ستجده في المسار الرئيسي للتطبيق. هذا السكربت يمكن استخدامه لتشغيل المهام التي تعمل في الخفاء (background) أو لتنفيذ مهام الصيانة (ال maintenance).
    ستجد الوصف الخاص بهذا السكربت + داخل هذه الصفحة Console Application Section. +

    + Application Structure From 2a7c810d75e6acf78929a6270f59c1e093fb38ee Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 17:55:28 +0300 Subject: [PATCH 14/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 0b36bf6c91..e447fe09c9 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -78,7 +78,7 @@ all [controller classes](structure-controllers.md). The following diagram shows the static structure of an application. -![Static Structure of Application](images/application-structure.png) +![Static Structure of Application](../guide/images/application-structure.png) Each application has an entry script `web/index.php` which is the only Web accessible PHP script in the application. The entry script takes an incoming request and creates an [application](structure-applications.md) instance to handle it. @@ -92,7 +92,7 @@ Request Lifecycle The following diagram shows how an application handles a request. -![Request Lifecycle](images/request-lifecycle.png) +![Request Lifecycle](../guide/images/request-lifecycle.png) 1. A user makes a request to the [entry script](structure-entry-scripts.md) `web/index.php`. 2. The entry script loads the application [configuration](concept-configurations.md) and creates From 9025d1e54092e7625cdaab3e072df678e3688a8e Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 18:07:40 +0300 Subject: [PATCH 15/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index e447fe09c9..2579d4dd29 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -45,10 +45,11 @@ -Application Structure ---------------------- +##
    هيكلية التطبيق - Application Structure -The most important directories and files in your application are (assuming the application's root directory is `basic`): +

    + أكثر المسارات والملفات أهمية الموجودة داخل التطبيق (بافتراض أن ال application's root directory هو basic) هي: +

    ``` basic/ application base path From 23395d3154a50eb116e357c13724935fc7caf3cf Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 18:47:45 +0300 Subject: [PATCH 16/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 2579d4dd29..020fb66b88 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -69,8 +69,10 @@ basic/ application base path yii the Yii console command execution script ``` -In general, the files in the application can be divided into two types: those under `basic/web` and those -under other directories. The former can be directly accessed via HTTP (i.e., in a browser), while the latter can not and should not be. +

    + بشكل عام، يمكن تقسيم الملفات داخل التطبيق إلى نوعين: الاول تجده تحت المسار التالي: basic/web +وبنائا على ذلك، يمكن الوصول إلى النوع الأول مباشرة عبر HTTP (أي من خلال المتصفح) ، بينما لا يمكن أن يكون ذلك للنوع الثاني. +

    Yii implements the [model-view-controller (MVC)](http://wikipedia.org/wiki/Model-view-controller) architectural pattern, which is reflected in the above directory organization. The `models` directory contains all [model classes](structure-models.md), From add25f9d19216222d87169e5245e1af623c15ac5 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 18:51:48 +0300 Subject: [PATCH 17/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 020fb66b88..1690fb880a 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -70,8 +70,8 @@ basic/ application base path ```

    - بشكل عام، يمكن تقسيم الملفات داخل التطبيق إلى نوعين: الاول تجده تحت المسار التالي: basic/web -وبنائا على ذلك، يمكن الوصول إلى النوع الأول مباشرة عبر HTTP (أي من خلال المتصفح) ، بينما لا يمكن أن يكون ذلك للنوع الثاني. +بشكل عام، يمكن تقسيم الملفات داخل التطبيق إلى نوعين: الاول تجده تحت المسار التالي: basic/web +وبنائا على ذلك، فإنه من الممكن الوصول إلى النوع الأول مباشرة عبر ال HTTP (أي من خلال المتصفح) ، بينما لا يمكن أن يكون ذلك للنوع الثاني.

    Yii implements the [model-view-controller (MVC)](http://wikipedia.org/wiki/Model-view-controller) architectural pattern, From eb109c3cea62a99200cc10adc8dc2520c41951a8 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Thu, 25 Oct 2018 19:15:50 +0300 Subject: [PATCH 18/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 1690fb880a..f072731d59 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -74,10 +74,11 @@ basic/ application base path وبنائا على ذلك، فإنه من الممكن الوصول إلى النوع الأول مباشرة عبر ال HTTP (أي من خلال المتصفح) ، بينما لا يمكن أن يكون ذلك للنوع الثاني.

    -Yii implements the [model-view-controller (MVC)](http://wikipedia.org/wiki/Model-view-controller) architectural pattern, -which is reflected in the above directory organization. The `models` directory contains all [model classes](structure-models.md), -the `views` directory contains all [view scripts](structure-views.md), and the `controllers` directory contains -all [controller classes](structure-controllers.md). +

    + يعتمد ال Yii على إستخدام ال MVC، وال MVC هو أحد ال Architectural Pattern، وهي اختصار ل model-view-controller، +هذا الأسلوب ينعكس في تنظيم المسارات الخاصة بالملفات كما في الشكل أعلاه. يحتوي المسار models على جميع الكلاس (model classes) ، ويحتوي مسار ال views على جميع الصفحات التي ستستخدم في العرض (view scripts)، ويحتوي مسار الcontrollers على + جميع (controller classes) +

    The following diagram shows the static structure of an application. From cd3e861cf48968bb6b473b358ccd926ec4abf37b Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Fri, 26 Oct 2018 16:20:23 +0200 Subject: [PATCH 19/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index f072731d59..8b686493f7 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -80,15 +80,16 @@ basic/ application base path جميع (controller classes)

    -The following diagram shows the static structure of an application. +

    + يوضح المخطط التالي ال static structure للتطبيق. +

    ![Static Structure of Application](../guide/images/application-structure.png) -Each application has an entry script `web/index.php` which is the only Web accessible PHP script in the application. -The entry script takes an incoming request and creates an [application](structure-applications.md) instance to handle it. -The [application](structure-applications.md) resolves the request with the help of its [components](concept-components.md), -and dispatches the request to the MVC elements. [Widgets](structure-widgets.md) are used in the [views](structure-views.md) -to help build complex and dynamic user interface elements. +

    + يحتوي كل تطبيق على نص برمجي يستخدم للدخول الى التطبيق (كبوابة بعدها يظهر التطبيق للناظر)، ويسمى هذا الجزء بال entry script، وهو يمثل الصفحة web/index.php، ويعد هذا المدخل النص البرمجي الوحيد الذي يمكن الوصول إليه من خلال ال PHP في التطبيق، ويعمل هذا ال entry script على أخذ ال request ومن ثم إنشاء instance خاص بالتطبيق ليستطيع التعامل معه (التعامل مع التطبيق ومكوناته). + يقوم التطبيق على معالجة ال request بمساعدة من ال components، ومن ثم بقوم التطبيق بإرسال ال request الى عناصر ال MVC، كما يتم استخدام ال Widgets في ال views للمساعدة في إنشاء العناصر المعقدة والمتغيرة (Complex & Dynamic user interface) لواجهة المستخدم. +

    Request Lifecycle From a139deabf71603f834b2261c9027a5a14401b863 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Fri, 26 Oct 2018 16:34:48 +0200 Subject: [PATCH 20/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 8b686493f7..0c8dc6c08f 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -92,24 +92,18 @@ basic/ application base path

    -Request Lifecycle ------------------ +##
    دورة الحياة الخاصة بال request -The following diagram shows how an application handles a request. +

    +يوضح المخطط التالي كيفية معالجة التطبيق ل request معين. +

    ![Request Lifecycle](../guide/images/request-lifecycle.png) -1. A user makes a request to the [entry script](structure-entry-scripts.md) `web/index.php`. -2. The entry script loads the application [configuration](concept-configurations.md) and creates - an [application](structure-applications.md) instance to handle the request. -3. The application resolves the requested [route](runtime-routing.md) with the help of - the [request](runtime-requests.md) application component. -4. The application creates a [controller](structure-controllers.md) instance to handle the request. -5. The controller creates an [action](structure-controllers.md) instance and performs the filters for the action. -6. If any filter fails, the action is cancelled. -7. If all filters pass, the action is executed. -8. The action loads some data models, possibly from a database. -9. The action renders a view, providing it with the data models. -10. The rendered result is returned to the [response](runtime-responses.md) application component. -11. The response component sends the rendered result to the user's browser. +
      +
    1. يقةم المستخدم بعمل request لل entry script web/index.php.
    2. +
    3. يقوم ال entry script على جلب الإعدادات الخاصة بالتطبيق ومن ثم إنشاء ال instance الخاص بالتطبيق ليستطيع التحكم ب request وإدارتها.
    4. +
    5. يقوم التطبيق بمعالجة ال requested route بمساعدة من ال request application component.
    6. +
    7. يقوم التطبيق على إنشاء instance من ال controller للتحكم بال request.
    8. +
    From 97e87b33a024978b0a49d9e0b12e4b3d94c14622 Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Fri, 26 Oct 2018 16:39:49 +0200 Subject: [PATCH 21/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 0c8dc6c08f..d706844755 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -101,9 +101,16 @@ basic/ application base path ![Request Lifecycle](../guide/images/request-lifecycle.png)
      -
    1. يقةم المستخدم بعمل request لل entry script web/index.php.
    2. +
    3. يقوم المستخدم بعمل request لل entry script web/index.php.
    4. يقوم ال entry script على جلب الإعدادات الخاصة بالتطبيق ومن ثم إنشاء ال instance الخاص بالتطبيق ليستطيع التحكم ب request وإدارتها.
    5. يقوم التطبيق بمعالجة ال requested route بمساعدة من ال request application component.
    6. يقوم التطبيق على إنشاء instance من ال controller للتحكم بال request.
    7. +
    8. يقوم ال controller على إنشاء action instance مع مجموعة من الفلاتر(المرشحات) الخاصة بهذا ال action.
    +6. If any filter fails, the action is cancelled. +7. If all filters pass, the action is executed. +8. The action loads some data models, possibly from a database. +9. The action renders a view, providing it with the data models. +10. The rendered result is returned to the [response](runtime-responses.md) application component. +11. The response component sends the rendered result to the user's browser. From 4e732d80360534e90bd3984c2de69e4cc762d9cc Mon Sep 17 00:00:00 2001 From: Anees Hikmat Abu-hamid Date: Fri, 26 Oct 2018 23:43:41 +0200 Subject: [PATCH 22/22] Update start-workflow.md --- docs/guide-ar/start-workflow.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index d706844755..6bdd9f11e4 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -106,11 +106,10 @@ basic/ application base path
  • يقوم التطبيق بمعالجة ال requested route بمساعدة من ال request application component.
  • يقوم التطبيق على إنشاء instance من ال controller للتحكم بال request.
  • يقوم ال controller على إنشاء action instance مع مجموعة من الفلاتر(المرشحات) الخاصة بهذا ال action.
  • +
  • في حالة فشل أي فلتر، يتم إلغاء الإجراء.
  • +
  • في حال نجاح جميع الفلاتر ، يتم تنفيذ الإجراء.
  • +
  • يقوم ال action بجلب بعض البيانات الخاصة بال models, وفي الغالب ستكون من قاعدة البيانات إن أمكن ذلك.
  • +
  • سيقوم ال action بجلب ال view ليقوم بتقديم البيانات التي تم جلبها لل view.
  • +
  • عملية الجلب السابقة ستقوم على إرجاع النتائج الى response application component
  • +
  • بعد ذلك سيقوم ال response component بإرسال النتيجة النهائية الى المتصفح الخاص بالمستخدم.
  • - -6. If any filter fails, the action is cancelled. -7. If all filters pass, the action is executed. -8. The action loads some data models, possibly from a database. -9. The action renders a view, providing it with the data models. -10. The rendered result is returned to the [response](runtime-responses.md) application component. -11. The response component sends the rendered result to the user's browser.