Skip to content

Latest commit

 

History

History
68 lines (61 loc) · 2.29 KB

zff-i-apr-2018.md

File metadata and controls

68 lines (61 loc) · 2.29 KB

ZF Fundamentals I NOTES April 2018

Re: Controllers Lab:

  • Create a directory "Factory" under "Controller" and put factories there
  • See revised lab with corrections in README file in class repo
  • Consider using the command line tool:
cd /path/to/onlinemarket.work
vendor/bin/generate-factory-for-class Class\\Name\\With\\Namespace

Re: Routing

  • Why does "Literal" not work for child when controller not specified
    • When you use "Segment" controller inherits OK?

VM Notes

guestbook project

  • Need to update the database structure:
    • From the browser go to http://localhost/
    • Select phpMyAdmin
    • Select guestbook
    • Select SQL
    • Paste in the following:
CREATE TABLE `entry` (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `website` varchar(255) NOT NULL,
  `message` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  • To test:
    • From the browser: http://guestbook/guestbook
    • Enter the requested info and post
    • Check to make sure your entry has been posted

onlinemarket.work

  • Might want to create a link on the "homepage" which appears when you enter http://localhost/
<a href=http://onlinemarket.work>onlinemarket.work</a></br>

VM Provisioning Output

...
    default: Provisioning virtual hosts for the project...
    default: [DONE: Provisioning virtual hosts]
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: Running provisioner: shell...
    default: Running: C:/Users/george/AppData/Local/Temp/vagrant-shell20180329-3572-16myi8d.sh
    default: Bootstrap the course MySql database...
    default: Creating database for guestbook and populating
    default: Creating database for onlinemarket and populating
    default: [DONE: Provisioning course MySQL DB]
==> default: Running provisioner: shell...
    default: Running: C:/Users/george/AppData/Local/Temp/vagrant-shell20180329-3572-44t1vv.sh
    default: Provisioning environment...
    default: [DONE: Provisioning environment]
==> default: Running provisioner: shell...
    default: Running: C:/Users/george/AppData/Local/Temp/vagrant-shell20180329-3572-drfo1n.sh
    default: Provisioning general cleanup detail...
    default: [DONE: Provisioning cleanup]