Please refer to http://tomschlick.com/2012/11/01/composer-with-fuelphp/ for a better writeup on how to add Composer support to FuelPHP 1.x.
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
[ | |
{ | |
"keys": ["super+alt+left"], | |
"command": "set_layout", | |
"args": | |
{ | |
"cols": [0.0, 0.33, 1.0], | |
"rows": [0.0, 1.0], | |
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]] | |
} |
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
#allows a single uri through the .htaccess password protection | |
SetEnvIf Request_URI "/testing_uri$" test_uri | |
#allows everything if its on a certain host | |
SetEnvIf HOST "^testing.yoursite.com" testing_url | |
SetEnvIf HOST "^yoursite.com" live_url | |
Order Deny,Allow | |
AuthName "Restricted Area" | |
AuthType Basic |
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 | |
$data = array( | |
array( | |
'info' => array( | |
'pet' => array( | |
'type' => 'dog' | |
) | |
), | |
), |
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 | |
// Input array | |
$user = array( | |
'name' => 'Bob Smith', | |
'age' => 43, | |
'address' => array( | |
'city' => 'Houston', | |
'state' => 'TX', |
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 | |
function array_sort($array, $key, $order = 'asc', $sort_flags = SORT_REGULAR) | |
{ | |
if( ! is_array($array)) | |
{ | |
return FALSE; | |
} | |
foreach($array as $k=>$v) |
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 | |
function array_element($array, $key, $default = false) | |
{ | |
$key = explode('.', $key); | |
if(count($key) > 1) | |
{ | |
if ( ! is_array($array) || ! array_key_exists($key[0], $array)) | |
{ | |
return $default; |
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
function ordinal($n) | |
{ | |
$ln = (int) substr($n, -1); | |
$sln = (int) substr($n, -2); | |
$r = array('st','nd','rd'); | |
$es = (($sln < 11 || $sln > 19) && $ln > 0 && $ln < 4); | |
return $n . ($es ? $r[$ln - 1] : 'th'); | |
} |
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
function delete_blog_posts($where) | |
{ | |
$this->db->where($where); | |
$this->db->delete(‘blog_posts’); | |
return $this->db->affected_rows(); | |
} |
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
function update_blog_posts($where, $data) | |
{ | |
$this->db->where($where); | |
$this->db->update(‘blog_posts’, $data); | |
return $this->db->affected_rows(); | |
} |