PHP 開發框架,CakePHP 3.1.0 發布
CakePHP是一個運用了諸如ActiveRecord、Association Data Mapping、Front Controller和MVC等著名設計模式的快速開發框架。該項目主要目標是提供一個可以讓各種層次的PHP開發人員快速地開發出健壯的Web應用,而 又不失靈活性。主要特性:
基于MVC架構
視圖支持Ajax
內置校驗框架
提供應用程序的基礎模塊和CRUD 代碼自動生成功能
提供處理session,request,security的組件
靈活的視圖緩存功能
面向對象
無需配置:只要安裝好數據庫
兼容PHP4和PHP5。
-
ORM 增強
</li> -
Mailers 允許創建可重用郵件
</li> -
模板提供額外的模板變量
</li> -
Shell Helpers 可以讓你輕松打包復雜輸出生成代碼
</li> -
刷新默認應用樣式
</li> </ul>相比 3.0 一些重要的改進:
-
</li>FlashComponentnow stacks Flash messages created with theset()or__call()methods. This means that the structure in the Session for stored Flash messages has changed. -
New configuration option
</li>storagehas been added. It contains the storage class name thatAuthComponentuses to store user record. By defaultSessionStorageis used. If using a stateless authenticator you should configureAuthComponentto useMemoryStorageinstead. -
You can now also configure
</li>AuthComponentto do the auth check before controller'sbeforeFilter()callback is run using thecheckAuthInconfiguration. This is particularly useful when using stateless authenticators. -
</li>RequestHandlerComponentnow switches the layout and template based on the parsed extension orAccept-Typeheader in thebeforeRender()callback instead ofstartup()callback. -
The default mime-type used when sending requests has changed in Http\Client. Previously
</li> </ul>multipart/form-datawould always be used. In 3.1,multipart/form-datais only used when file uploads are present. When there are no file uploads,application/x-www-form-urlencodedis used.其他改進
-
The default route class has been changed to
</li>DashedRoutein thecakephp/apprepository. Your current code base is not affected by this, but it is recommended to use this route class from now on. -
The
</li>breakpoint()helper function has been added. This function provides a snippet of code that can be put intoeval()to trigger an interactive console. -
</li>Shell::dispatchShell()no longer outputs the welcome message from the dispatched shell. -
You can now set
</li>_serializedtotrueforJsonViewandXmlViewto serialize all view variables instead of explicitly specifying them. -
</li>Time::fromNow()has been added. This method makes it easier to calculate differences from 'now'. -
</li>Time::i18nFormat()now supports non-gregorian calendars when formatting dates. -
</li>Validation::latitude(), andValidation::longitude()were added. -
</li>Validation::ascii(),Validation::utf8(), andValidation::isInteger()were added. -
</li>Cache::add()was ported from 2.x. This method allows you to atomically add data to a cache backend if the key did not already exist. -
</li>Time::listTimezones()now supports options to display timezone abbreviations. -
</li>Hash::get()now supports objects implementing ArrayAccess. -
</li> </ul>Hash::sort()supports case-insensitive sorting through a newignoreCaseoption.廢棄功能
-
The
</li>SessionHelperhas been deprecated. You can use$this->request->session()directly. -
The following Controller properties are now deprecated:
Instead of setting these properties on your controllers, you should set them using the ViewBuilder.
</li>-
layout
</li> -
view
</li> -
theme
</li> -
autoLayout
</li> -
viewPath
</li> -
layoutPath
</li> </ul> </ul>升級
php composer.phar require 'cakephp/cakephp:3.1.*' php composer.phar require 'cakephp/debug_kit:3.2.*' php composer.phar require 'cakephp/bake:1.1.*'
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!
-
-
-
-