O'Reilly logo

Zend Framework 2.0 by Example Beginner's Guide by Krishna Shasankar V

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – implementing a simple photo gallery

Carry out the following steps:

  1. Create a new entity called ImageUpload with the following table structure:
          CREATE TABLE IF NOT EXISTS image_uploads (
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
            filename VARCHAR( 255 ) NOT NULL ,
            thumbnail VARCHAR( 255 ) NOT NULL ,
            label VARCHAR( 255 ) NOT NULL ,
            user_id INT NOT NULL,
            UNIQUE KEY (filename)
          );
  2. Create the relevant ImageUpload entity in the src/Users/Model/ImageUpload.php file, the TableGateway object in the src/Users/Model/ImageUploadTable.php file, and the Controller (MediaManagerController) inside the module (CommunicationApp/module/Users) in the src/Users/Controller/MediaManagerController.php file.
  3. In the Upload form's Submit process, generate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required