Skip to content

Instantly share code, notes, and snippets.

@junichi11
Created November 12, 2012 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junichi11/4058357 to your computer and use it in GitHub Desktop.
Save junichi11/4058357 to your computer and use it in GitHub Desktop.
CakePHP controller sample
<?php
class PostsController extends AppController {
public $uses = array('Post', 'Foo', 'Bar');
public $components = array('Session', 'Security');
public $helpers = array('Html', 'Form');
public function index() {
$this->Post->recursive = 0;
// $this-> [Ctrl + Space]
$this->Session->write("foo");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment