Skip to content

Instantly share code, notes, and snippets.

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "D2Test"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
<?php
use Doctrine\ORM\EntityManager,
Doctrine\ORM\Configuration;
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initDoctrine()
{
<?php
class BlogController extends Zend_Controller_Action
{
protected $_em;
public function init()
{
$this->_em = $this->getInvokeArg('bootstrap')->getResource('doctrine');
}
<?php
/**
* Secure Controllers
*
* @package Teleserv
* @author Bryan Zarzuela
*/
class Teleserv_Controller_Action_Secure extends Zend_Controller_Action
{
@bzarzuela
bzarzuela / gist:940205
Created April 25, 2011 05:39
what's not to love about coffeescript and ext?
sm = tickets.getSelectionModel()
selections = sm.getSelections()
ids = []
for selection in selections
ids.push(selection.data.id)
console.log ids
@bzarzuela
bzarzuela / gist:953151
Created May 3, 2011 10:50
requires config option
Ext.application
name: 'nso'
autoCreateViewport: false
appFolder: 'js/nso/app'
controllers: ['Users']
requires:[
@bzarzuela
bzarzuela / DateRangeParser.php
Created October 25, 2013 10:24
A date range parser in PHP that will take input like October 15-25, 2013 and return October 15, 2013 and October 25, 2013. Because it was faster to write than Google for it.
<?php
/*
A class that takes September 15 - 30, 2013 input and converts it into two dates.
Also supports September 15 to 30, 2013.
*/
class DateRangeParser
{
public function splitMonth($range)