Upgrade to Pro — share decks privately, control downloads, hide ads and more …

phalconのススメ@PHP BLT#5

phalconのススメ@PHP BLT#5

shun0102

July 20, 2016
Tweet

Other Decks in Programming

Transcript

  1. ࣗ෼ͰͱͬͨIFMMPXPSMEϕϯνϚʔΫ ؀ڥ ɾGCP vCPU 2, memory 7.5GB 
 ɾphp 7.0.8

    0 1000 2000 3000 4000 raw phalcon 2.1 slim 3.4 lumen 5.4
  2. 1IBMDPO։ൃऀπʔϧ $ phalcon project phalcon_hello ɾϓϩδΣΫτͷ਽ܗͷ࡞੒ ɾར༻ՄೳͳίϚϯυ $ phalcon commands

    Available commands: commands (alias of: list, enumerate) controller (alias of: create-controller) module (alias of: create-module) model (alias of: create-model) all-models (alias of: create-all-models) project (alias of: create-project) scaffold (alias of: create-scaffold) migration (alias of: create-migration) webtools (alias of: create-webtools)
  3. $ tree . ᵓ── app │ ᵓ── cache │ ᵓ──

    config │ │ ᵓ── config.php │ │ ᵓ── loader.php │ │ └── services.php │ ᵓ── controllers │ │ ᵓ── ControllerBase.php │ │ └── IndexController.php │ ᵓ── migrations │ ᵓ── models │ └── views │ ᵓ── index │ │ └── index.volt │ ᵓ── index.volt │ └── layouts ᵓ── index.html └── public ᵓ── css ᵓ── files ᵓ── img ᵓ── index.php ᵓ── js └── temp σΟϨΫτϦߏ଄͸ࣗ༝͕ͩɺ਽ܗ͸͋Δ
  4. ґଘੑͷ஫ೖ %* <?php use Phalcon\Session\Adapter\Files as SessionFiles; $di = new

    Phalcon\Di(); $di->setShared('session', function () { $session = new SessionFiles(); $session->start(); return $session; }); $session = $di->get('session');
  5. .7$ $ tree . ᵓ── app │ ᵓ── controllers │

    │ ᵓ── ControllerBase.php │ │ └── IndexController.php │ ᵓ── models │ └── views │ ᵓ── index │ │ └── index.volt │ ᵓ── index.volt │ └── layouts