How To API With Silex
Joey Rivera
Me!O Joey Rivera @joeyriveraO Hobbies
O Family LifeO PhpO AngularJSO CarsO Gamer
O Work at Salesforce Pardot
What is it?O Micro-frameworkO Built on symfonyO Great for APIO EASY!
FeaturesO PimpleO Routing
O GET/PUT/POST/DELETE/PATCH/OPTIONSO Middlewares
O Before/after/finishO ServiceProviders
O Twig/security/monolog/doctrineO ControllersO Commands
SetupO Composer
O "silex/silex": "~1.3”O Rewrite rules/.htaccessO Note: $app becomes the DIC
HTTP MethodsO GET/PUT/POST/DELETE/PATCH/
OPTIONS
HTTP Methods Cont.O Real example getting a user:
O GET /users/1
Middleware and Error Handling
O AuthenticationO Error Handling
ServiceProviderO DoctrineORM Exaple
CommandsO DbReset Example
Question?O @joeyriveraO All code at:
O https://github.com/joeyrivera/phpug-silex-intro
O http://silex.sensiolabs.org/