This file contains hidden or 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
/** | |
* Set the routes. Each route must have a minimum of a name, a URI and a set of | |
* defaults for the URI. | |
*/ | |
Route::set('api', '(<action>(/<id>))') | |
->defaults(array( | |
'subdomain' => 'api', | |
'controller' => 'api', | |
'action' => 'subdomain', | |
)); |
This file contains hidden or 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
// API | |
Route::set('api', '(<action>(/<subaction>))') | |
->defaults(array( | |
'subdomain' => 'api', // api.domain.com | |
'controller' => 'api', | |
'action' => 'index', | |
)); | |
// Load the website | |
Route::set('welcome', '(<action>(/<subaction>))') |
This file contains hidden or 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 | |
/** | |
* These are just the language codes, not regions. This means it only lists en, not en-US, en-CA etc. | |
* @see http://www.iana.org/assignments/language-subtag-registry | |
*/ | |
return array | |
( | |
"aa" => "Afar", | |
"ab" => "Abkhazian", |
This file contains hidden or 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
#! /bin/bash | |
if [[ $1 == '' ]]; then | |
echo -e "Which folder do you want to initialise the kohana project in?" | |
read -a dir | |
dir=${dir[@]} | |
else | |
dir=$@ | |
fi |
This file contains hidden or 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
public function action_index() | |
{ | |
echo "<h1>Validation checking</h1>"; | |
$data = array( | |
"contact_name" => "Name here", | |
"contact_email" => "[email protected]", | |
"company_name" => "Newco Inc", | |
"password" => "", | |
"site_name" => "Newco Inc", |
This file contains hidden or 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
public function set($values, $value = NULL) | |
{ | |
if ($value) | |
{ | |
// Normalise single field setting to multiple field setting | |
$values = array($values => $value); | |
} | |
if ( ! $values) | |
return $this; |
This file contains hidden or 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
# Before installing, install: libjpg, libpng, freetype, t1lib, gettext, icu, libmcrypt, | |
# This should be in the shell script but I'm mixing homebrew with source downloads, and I can't be assed. I'm half way through already. | |
sudo ./configure \ | |
--enable-fpm \ | |
--with-libxml-dir=/usr/lib \ | |
--with-openssl \ | |
--with-zlib \ | |
--enable-exif \ | |
--enable-ftp \ |
This file contains hidden or 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 | |
// Helper/Data.php | |
... | |
public function prepareIndexdata($index, $separator = ' ', $entity_id = NULL) | |
{ | |
$_attributes = array(); |
This file contains hidden or 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
# Contains the game state in a protected (closure) variable | |
state : -> | |
# Our protected variable, only changeable through the setState method | |
# defined below | |
_state = 'stopped' | |
# The state method will (from the 2nd call onwards) only return the | |
# state. | |
@.state = -> | |
_state |
OlderNewer