Coder Social home page Coder Social logo

cybercandyman / zf2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zendframework/zendframework

0.0 0.0 0.0 66.46 MB

Official Zend Framework 2.0 git repository

Home Page: http://framework.zend.com/zf2

License: BSD 3-Clause "New" or "Revised" License

Shell 0.01% PHP 99.99%

zf2's Introduction

Welcome to the Zend Framework 2.0 Release!

Master: Build Status Develop: Build Status

RELEASE INFORMATION

Zend Framework 2.0.4dev

This is the fourth maintenance release for the 2.0 series.

XX YYY 2012

UPDATES IN 2.0.4

Security Changes

By default, the JsonStrategy and FeedStrategy were selecting their associated renderers based on two criteria: if a ViewModel of appropriate type was present, OR if the Accept header matched certain criteria. It was pointed out that this latter is undesirable when the strategies are enabled globally, as any matching route could be forced to return JSON or a feed -- and potentially expose information not meant for that particular format, or raise exceptions due to containing content not compatible with the format.

In this release, we removed the Accept header detection. To mitigate this, however, a new controller plugin, AcceptableViewModelSelector, was added. This plugin may be invoked from a controller, and based on criteria passed to it, return an appropriate view model type based on matching the Accept header. As an example:

class SomeController extends AbstractActionController
{
    protected $acceptCriteria = array(
        'Zend\View\Model\JsonModel' => array(
            'application/json',
        ),
        'Zend\View\Model\FeedModel' => array(
            'application/rss+xml',
        ),
    );

    public function apiAction()
    {
        $viewModel = $this->acceptableViewModelSelector($this->acceptCriteria);
        
        // Potentially vary execution based on model returned
        if ($viewModel instanceof JsonModel) {
            // ...
        }
    }
}

You will still enable the JsonStrategy or FeedStrategy at the global level, but they will only be selected now if an appropriate view model is returned by the controller; the above plugin can help you select the appropriate view model based on Accept header on an as-needed basis.

For more changes, please see CHANGELOG.md.

SYSTEM REQUIREMENTS

Zend Framework 2 requires PHP 5.3.3 or later; we recommend using the latest PHP version whenever possible.

INSTALLATION

Please see INSTALL.md.

CONTRIBUTING

If you wish to contribute to Zend Framework 2.0, please read both the CONTRIBUTING.md and README-GIT.md file.

QUESTIONS AND FEEDBACK

Online documentation can be found at http://framework.zend.com/manual. Questions that are not addressed in the manual should be directed to the appropriate mailing list:

http://framework.zend.com/archives/subscribe/

If you find code in this release behaving in an unexpected manner or contrary to its documented behavior, please create an issue in our GitHub issue tracker:

https://github.com/zendframework/zf2/issues

If you would like to be notified of new releases, you can subscribe to the fw-announce mailing list by sending a blank message to [email protected].

LICENSE

The files in this archive are released under the Zend Framework license. You can find a copy of this license in LICENSE.txt.

ACKNOWLEDGEMENTS

The Zend Framework team would like to thank all the contributors to the Zend Framework project, our corporate sponsor, and you, the Zend Framework user. Please visit us sometime soon at http://framework.zend.com.

zf2's People

Contributors

weierophinney avatar evandotpro avatar maks3w avatar marc-mabe avatar prolic avatar akrabat avatar dasprid avatar b-durand avatar thomasweidner avatar bakura10 avatar ezimuel avatar sasezaki avatar cgmartin avatar denixport avatar farazdagi avatar thinkscape avatar kokx avatar mikaelkael avatar robertbasic avatar jonathanmaron avatar socalnick avatar blanchonvincent avatar ocramius avatar freeaqingme avatar waltertamboer avatar adamlundrigan avatar davidwindell avatar sgehrig avatar leftbrained avatar samsonasik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.