Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Kohana extends Kohana_Core { | |
/** | |
* Augments the core method for two reasons: | |
* 1) Reserve an extra 1M memory to allow handling memory_limit violation. | |
* 2) Reserve more exec time to allow max_execution_time violation. | |
* | |
* Note: keep variable creation at a minimum. |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
/** | |
* Countries List | |
* @return array | |
*/ | |
function countries() | |
{ | |
$countries = Array( | |
'AF' => 'Afghanistan', |
<?php | |
class Pagination { | |
public static function factory($total, $limit = 5, $page = 1, $adjacents = 2) | |
{ | |
return new Pagination($total, $limit, $page, $adjacents); | |
} | |
public $total; |
<?php | |
class Controller_News { | |
public function action_category() | |
{ | |
$category = ORM::factory('news_category', array('url' => $this->request->param('category'))); | |
if ( ! $category->loaded()) | |
{ |
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Model_Bla extends ORM { | |
public function rules() | |
{ | |
return array( | |
'phone_one' => array( | |
array('at_least', array(':validation', 1, array('phone_one', 'phone_two', 'phone_three'))), | |
), |
#!/bin/sh | |
git submodule status | awk '{ print $2 "/classes" }' | xargs ./phpcs.sh application/bootstrap.php index.php install.php | grep -F -e '| ERROR' -e '| WARNING' | wc -l |
class Debug extends Kohana_Debug { | |
public static function vars() | |
{ | |
if (func_num_args() === 0) | |
return; | |
$backtrace = debug_backtrace(); | |
$path = $backtrace[0]['file']; | |
$filename = Debug::path($path); |