Symfony Doctrine Cheatsheet

Installing cd into your project directory and run composer require doctrine Open the .env file and set your local config. This uses root user and password password and sets the name of the database to the_spacebar

Symfony Cheatsheat

Here’s a bunch of random notes on Symfony. These are kind of a summary of the SymfonyCasts tutorial track here. Creating a New Controller Right-click on the directory where you want your controller to to (probably src/Controller) Choose “New PHP Class” Because we installed the Symfony plugin, PhpStorm can pre-fill the namespace

String formatting tokens

String formatting tokens reference sheet: Token Data Type s char (cstring) d int f float .2f float rounded to 2 decimal places p pointer zu size_t @ An object’s description If you want to print a bool, you can do it like this: NSLog(@”%@”, BOOL_VAL ? @”YES” : @”NO”);  

NSDateFormatter Styles

Here is a great guide for how to format the string for the dateFormat method (like “yyyy-MM-dd”):

Categorized as resources