diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..90e0268 --- /dev/null +++ b/changelog.md @@ -0,0 +1,7 @@ +Yii Framework 2 Change Log +========================== + +Version 2 +--------- + +- Initial release. \ No newline at end of file diff --git a/docs/code_style.md b/docs/code_style.md new file mode 100644 index 0000000..01ab79e --- /dev/null +++ b/docs/code_style.md @@ -0,0 +1,43 @@ +Yii2 core code style +==================== + +### Brackets + +~~~ +class MyClass +{ + public function myClassMethod() + { + if($x) + { + // do it + } + else + { + // some code + } + } +} +~~~ + + +Proposals +--------- + +### Use type hinting like + +~~~ +public function __construct(CDbConnection $connection) +{ + $this->connection = $connection; +} +~~~ + +instead of + +~~~ +public function __construct($connection) +{ + $this->connection = $connection; +} +~~~ \ No newline at end of file diff --git a/docs/full_2011_11_12.png b/docs/full_2011_11_12.png new file mode 100644 index 0000000..ef50fcb Binary files /dev/null and b/docs/full_2011_11_12.png differ diff --git a/docs/hierarchy_2011_11_12.png b/docs/hierarchy_2011_11_12.png new file mode 100644 index 0000000..b5f8abc Binary files /dev/null and b/docs/hierarchy_2011_11_12.png differ diff --git a/license.md b/license.md new file mode 100644 index 0000000..4caa32b --- /dev/null +++ b/license.md @@ -0,0 +1,31 @@ +The Yii framework is free software. It is released under the terms of +the following BSD License. + +Copyright © 2008-2012 by Yii Software LLC (http://www.yiisoft.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of Yii Software LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..9dd631a --- /dev/null +++ b/readme.md @@ -0,0 +1,64 @@ +Yii 2 Web Programming Framework +=============================== + +Thank you for choosing Yii 2 — a high-performance component-based PHP framework. + + +INSTALLATION +------------ + +Please make sure the release file is unpacked under a Web-accessible +directory. You shall see the following files and directories: + + demos/ demos + framework/ framework source files + requirements/ requirement checker + changelog.md describing changes in every Yii release + license.md license of Yii + readme.md this file + updgrade.md upgrading instructions + + +REQUIREMENTS +------------ + +The minimum requirement by Yii is that your Web server supports +PHP 5.3.8 or above. Yii has been tested with Apache HTTP server +on Windows and Linux operating systems. + +Please access the following URL to check if your Web server reaches +the requirements by Yii, assuming "YiiPath" is where Yii is installed: + + http://hostname/YiiPath/requirements/index.php + + +QUICK START +----------- + +Yii comes with a command line tool called "yiic" that can create +a skeleton Yii application for you to start with. + +On command line, type in the following commands: + + $ cd YiiPath/framework (Linux) + cd YiiPath\framework (Windows) + + $ ./yiic webapp ../testdrive (Linux) + yiic webapp ..\testdrive (Windows) + +The new Yii application will be created at "YiiPath/testdrive". +You can access it with the following URL: + + http://hostname/YiiPath/testdrive/index.php + + +WHAT's NEXT +----------- + +Please visit the project website for tutorials, class reference +and join discussions with other Yii users. + + + +The Yii Developer Team +http://www.yiiframework.com \ No newline at end of file diff --git a/todo.txt b/todo.md similarity index 86% rename from todo.txt rename to todo.md index 2b383f4..71678cb 100644 --- a/todo.txt +++ b/todo.md @@ -1,61 +1,63 @@ -- logging - * WebTarget - * ProfileTarget - * Toolbar ? -- base - * error/exception handling - * module - * application - * http exception - * security -- validators - * type conversion rules - * CompareValidator::clientValidateAttribute(): search for "CHtml::activeId" - * FileValidator, UniqueValidator, ExistValidator, DateValidator: TBD - * consider merging UniqueValidator and ExistValidator and using a NOT property. -- console command support -- built-in console commands - + api doc builder - * support for markdown syntax - * support for [[name]] - * consider to be released as a separate tool for user app docs -- caching - * a way to invalidate/clear cached data - * a command to clear cached data -- db - * DAO - * schema - * write a guide on creating own schema definitions - * AR - * saving related records - * collection support for results - * document-based (should allow storage-specific methods additionally to generic ones) - * mongodb - * key-value-based (should allow storage-specific methods additionally to generic ones) - * redis - * memcachedb -- i18n - * consider using PHP built-in support and data - * message translations, choice format - * formatting: number and date - * parsing?? - * make dates/date patterns uniform application-wide including JUI, formats etc. -- helpers - * array - * image - * string - * file -- web: TBD - * get/setFlash() should be moved to session component - * support optional parameter in URL patterns -- gii - * move generation API out of gii, provide yiic commands to use it. Use same templates for gii/yiic. - * i18n variant of templates - * allow to generate module-specific CRUD -- markup and HTML helpers - * use HTML5 instead of XHTML -- assets - * ability to manage scripts order (store these in a vector?) - * http://ryanbigg.com/guides/asset_pipeline.html, use content hash instead of mtime + directory hash. -- collections - * http://code.google.com/p/yii/source/detail?r=3428 +- logging + * WebTarget + * ProfileTarget + * Toolbar ? +- base + * error/exception handling + * Convert all PHP errors into exceptions, remove YII_ENABLE_ERROR_HANDLER and error handler (?) + * module + * application + * http exception + * security +- validators + * type conversion rules + * CompareValidator::clientValidateAttribute(): search for "CHtml::activeId" + * FileValidator, UniqueValidator, ExistValidator, DateValidator: TBD + * consider merging UniqueValidator and ExistValidator and using a NOT property. +- console command support +- built-in console commands + + api doc builder + * support for markdown syntax + * support for [[name]] + * consider to be released as a separate tool for user app docs +- caching + * a way to invalidate/clear cached data + * a command to clear cached data +- db + * DAO + * schema + * write a guide on creating own schema definitions + * AR + * saving related records + * collection support for results + * document-based (should allow storage-specific methods additionally to generic ones) + * mongodb + * key-value-based (should allow storage-specific methods additionally to generic ones) + * redis + * memcachedb +- i18n + * consider using PHP built-in support and data + * message translations, choice format + * formatting: number and date + * parsing?? + * make dates/date patterns uniform application-wide including JUI, formats etc. +- helpers + * array + * image + * string + * file +- web: TBD + * get/setFlash() should be moved to session component + * support optional parameter in URL patterns +- gii + * move generation API out of gii, provide yiic commands to use it. Use same templates for gii/yiic. + * i18n variant of templates + * allow to generate module-specific CRUD +- markup and HTML helpers + * use HTML5 instead of XHTML +- assets + * ability to manage scripts order (store these in a vector?) + * http://ryanbigg.com/guides/asset_pipeline.html, http://guides.rubyonrails.org/asset_pipeline.html, use content hash instead of mtime + directory hash. +- collections + * http://code.google.com/p/yii/source/detail?r=3428 +- Requirement checker \ No newline at end of file diff --git a/upgrade.md b/upgrade.md new file mode 100644 index 0000000..101001e --- /dev/null +++ b/upgrade.md @@ -0,0 +1,39 @@ +Upgrading Instructions for Yii Framework v2 +=========================================== + +!!!IMPORTANT!!! + +The following upgrading instructions are cumulative. That is, +if you want to upgrade from version A to version C and there is +version B between A and C, you need to following the instructions +for both A and B. + + +General upgrade intructions +--------------------------- + +- Make a backup. +- Clean up your 'assets' folder. +- Replace 'framework' dir with the new one or point SVN to a fresh + release and update. +- Check if everything is OK, if not — revert from backup and post + issues to Yii issue tracker. + + +Upgrading from v1.1.x +--------------------- + +- All framework classes are now namespaced, and the name prefix `C` is removed. +- The format of path alias is changed to `@yii/base/Component`. + In 1.x, this would be `system.base.CComponent`. See guide for more details. + +- The root alias `@yii` now represents the framework installation directory. + In 1.x, this is named as `system`. We also removed `zii` root alias. + + +- `CList` is renamed to `Vector`, and `CMap` is renamed to `Dictionary`. + Other collection classes are dropped in favor of SPL classes. + +- `CFormModel` is removed. Please use `yii\base\Model` instead. + + diff --git a/upgrade.txt b/upgrade.txt deleted file mode 100644 index 1aaa40f..0000000 --- a/upgrade.txt +++ /dev/null @@ -1,15 +0,0 @@ -- All framework classes are now namespaced, and the name prefix `C` is removed. - -- The format of path alias is changed to `@yii/base/Component`. - In 1.x, this would be `system.base.CComponent`. See guide for more details. - -- The root alias `@yii` now represents the framework installation directory. - In 1.x, this is named as `system`. We also removed `zii` root alias. - - -- `CList` is renamed to `Vector`, and `CMap` is renamed to `Dictionary`. - Other collection classes are dropped in favor of SPL classes. - -- `CFormModel` is removed. Please use `yii\base\Model` instead. - -