Giter Site home page Giter Site logo

kapitel19's Introduction

ZF2 Buch - Kapitel 19

Die Projektdateien für das Kapitel 19 vom Buch Zend Framework 2 - Von den Grundlagen bis zur fertigen Anwendung (ISBN 978-3-8273-2994-3) von Ralf Eggert aus dem Addison-Wesley Verlag installieren Sie wie folgt:

  /home/devhost/zf2buch/kapitel19
  • Alternativ wechseln Sie ins Verzeichnis /home/devhost/zf2buch/ und clonen das GitHub Repository entsprechend, z.B.
    $ cd /home/devhost/zf2buch/
    $ git clone https://github.com/ZF2Buch/kapitel19.git
    $ cd kapitel19/
  • Nun aktualisieren Sie den Composer und installieren das Projekt inklusive aller Abhängigkeiten
    $ php composer.phar selfupdate
    $ php composer.phar install
  • Als Letztes müssen Sie einen Virtual Host für den Apache2 einrichten oder einen bestehenden entsprechend anpassen.
    $ sudo touch /etc/apache2/sites-available/luigis-pizza.local
    $ sudo gedit /etc/apache2/sites-available/luigis-pizza.local

Der Virtual Host könnte so aussehen:

    <VirtualHost *>
      ServerName luigis-pizza.local
      DocumentRoot /home/devhost/zf2buch/kapitel19/public/
      AccessFileName .htaccess
      <Directory /home/devhost/zf2buch/kapitel19/public/>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
      </Directory>
    </VirtualHost>

Weitere Details zum Einrichten des Virtual Hosts entnehmen Sie bitte den Kapiteln 3.1.4 Virtual Host einrichten unter Linux und 3.1.5 Virtual Host einrichten unter Windows

Hinweise zum Zend Framework Release 2.1.5

Durch Änderungen im Routing wird im User Modul leider eine Exception geworfen:

  • Route with name "user" does not have child routes

    Dies Problem tritt auf, weil an mehreren Stellen die Route "user/action" verwendet wird. Diese wird jedoch nicht in der module.config.php definiert. Es gibt dort nur die "user" Route. Wird dies geändert, tritt der Bug nicht mehr auf.

Hinweise zum Zend Framework Release 2.2.0

Durch Änderungen im Translator wird im Application Modul leider folgender Fatal Error ausgegeben:

  • Catchable fatal error: Argument 1 passed to Zend\Validator\AbstractValidator::setDefaultTranslator() must be an instance of Zend\Validator\Translator\TranslatorInterface, instance of Zend\I18n\Translator\Translator given, called in /home/devhost/zf2buch/kapitel22/module/Application/src/Application/Listener/ApplicationListener.php on line 157 and defined in /home/devhost/zf2buch/kapitel22/vendor/zendframework/zendframework/library/Zend/Validator/AbstractValidator.php on line 472

    Um die Skripte mit ZF 2.2.0 zu nutzen, bitte in der Datei module/Application/src/Application/Listener/ApplicationListener.php bei den use Statements die Zeile

    use Zend\I18n\Translator\Translator;
    

    auskommentieren und die Zeile

    use Zend\Mvc\I18n\Translator;
    

    einkommentieren.

kapitel19's People

Contributors

zf2buch avatar

Watchers

 avatar  avatar  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.