This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tag a new release from current branch and push the tag up to origin | |
# Specify a semver release type of patch, minor or major. | |
# Usage: git-release patch|minor|major [--force] | |
git-release() { | |
type="$1" | |
if [ "$type" == "patch" ] || [ "$type" == "minor" ] || [ "$type" == "major" ] ;then | |
git fetch origin --tags | |
tags="$(git tag --sort version:refname)" | |
latest="none" | |
while read tag; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* JSON response to an AJAX call | |
* return $success allows us to pass through result of some action without _respondAJAX() getting in the way, ie $result = $this->_respondAJAX($some->action()); | |
*/ | |
protected function _respondAJAX($success=false, $data=null, $errors=null) | |
{ | |
$this->_helper->viewRenderer->setNoRender(true); | |
$this->_helper->layout->disableLayout(true); | |
$this->getResponse()->setHeader('Content-type', 'application/json'); | |
$this->view->clearVars(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$grid = $grid->filterRows(function($key, $label, $row){ | |
return array_reduce($row, function(&$result, $item){ | |
$result = is_null($item) ? $result : true; | |
}, false); | |
}); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in Bootstrap.php | |
if (PHP_SAPI == 'cli') | |
{ | |
$front = $this->getResource('frontcontroller'); | |
$front->setParam('disableOutputBuffering', true); | |
$front->setRouter( new Application_Model_RouterCLI() ); | |
$front->setRequest( new Zend_Controller_Request_Simple() ); | |
} | |
// the router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (PHP_SAPI != 'cli') //subdomain routing | |
{ | |
$domainname = $this->getOption('domainname'); | |
$subdomains = $this->getOption('subdomains'); | |
$router = $this->bootstrap('frontController')->getResource('frontController')->getRouter(); | |
// routes for mainsite (default router is added) | |
$wwwRoute = new Zend_Controller_Router_Route_Hostname( | |
$domainname, | |
array('module' => 'default') |