Skip to content

Instantly share code, notes, and snippets.

<?
class IndexController extends Controller
{
// Handles PUT
public function put_index()
{
}
// Handles POST
public function post_index()
<?
class IndexController extends Controller
{
public function index()
{
if ($this->request->method=='PUT')
{
// do something
}
}
config_map:
db: conf/jon
defines:
DEBUG : true
STATIC_SERVER: "http://jon.getheavy.info"
debug:
uses:
- system.debug.debug
config_map:
db: db/debug
session: session/debug
twitter: twitter/debug
defines:
DEBUG : true
STATIC_SERVER: "http://cool-dev.s3.amazonaws.com/"
environment: debug
version: 1234
environment: debug
version: 1234
debug:
uses:
- system.debug.debug
config_map:
db: db/debug
session: session/debug
twitter: twitter/debug
defines:
<?
$config=Config::Get("servers");
$config->server->url="http://newurl.com/";
$config->save();
<?
$config=Config::Get("servers");
echo $config['server']['url'];
<?
$config=Config::Get("servers");
echo $config->server->url;
{
"server": {
"name": "Server 1",
"url": "http://server1.whatevs.com"
}
}