PHP 開發框架,CakePHP 3.1.0 發布

jopen 10年前發布 | 10K 次閱讀 CakePHP

CakePHP是一個運用了諸如ActiveRecord、Association Data Mapping、Front Controller和MVC等著名設計模式的快速開發框架。該項目主要目標是提供一個可以讓各種層次的PHP開發人員快速地開發出健壯的Web應用,而 又不失靈活性。主要特性:

基于MVC架構
視圖支持Ajax
內置校驗框架
提供應用程序的基礎模塊和CRUD 代碼自動生成功能
提供處理session,request,security的組件
靈活的視圖緩存功能
面向對象
無需配置:只要安裝好數據庫
兼容PHP4和PHP5。

CakePHP 3.1.0 發布,此版本包含大量的改進:

  • ORM 增強

    </li>

  • Mailers 允許創建可重用郵件

    </li>

  • 模板提供額外的模板變量

    </li>

  • Shell Helpers 可以讓你輕松打包復雜輸出生成代碼

    </li>

  • 刷新默認應用樣式

    </li> </ul>

    相比 3.0 一些重要的改進:

    • FlashComponent now stacks Flash messages created with the set() or __call() methods. This means that the structure in the Session for stored Flash messages has changed.

      </li>

    • New configuration option storage has been added. It contains the storage class name that AuthComponent uses to store user record. By default SessionStorage is used.  If using a stateless authenticator you should configure AuthComponent to use MemoryStorage instead.

      </li>

    • You can now also configure AuthComponent to do the auth check before controller's beforeFilter() callback is run using the checkAuthIn configuration. This is particularly useful when using stateless authenticators.

      </li>

    • RequestHandlerComponent now switches the layout and template based on the parsed extension or Accept-Type header in the beforeRender() callback instead of startup() callback.

      </li>

    • The default mime-type used when sending requests has changed in Http\Client. Previously multipart/form-data would always be used. In 3.1, multipart/form-data is only used when file uploads are present. When there are no file uploads, application/x-www-form-urlencoded is used.

      </li> </ul>

      其他改進

      • The default route class has been changed to DashedRoute in the cakephp/app repository. Your current code base is not affected by this, but it is recommended to use this route class from now on.

        </li>

      • The breakpoint() helper function has been added. This function provides a snippet of code that can be put into eval() to trigger an interactive console.

        </li>

      • Shell::dispatchShell() no longer outputs the welcome message from the dispatched shell.

        </li>

      • You can now set _serialized to true for JsonView and XmlView to 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(), and Validation::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>

      • Hash::sort() supports case-insensitive sorting through a new ignoreCase option.

        </li> </ul>

        廢棄功能

        • The SessionHelper has been deprecated. You can use $this->request->session() directly.

          </li>

        • 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.*'

            下載:cakephp-3-1-0.zip


             本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
             轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
             本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!