Moved to
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Config extends CI_Config | |
{ | |
function __get($item) | |
{ | |
return parent::item($item); | |
} | |
function __set($item, $value) |
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 | |
/** | |
* @author Phil Sturgeon - PyroCMS development team | |
* @package PyroCMS | |
* @subpackage Installer | |
* | |
* @since v0.9.8 | |
* | |
*/ | |
class Installer_lib |
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
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine on | |
# NOTICE: If you get a 404 play with combinations of the following commented out lines | |
#AllowOverride All | |
#RewriteBase /wherever/ci/is | |
# Keep people out of codeigniter directory and Git/Mercurial data |
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
/** | |
* Force Array | |
* | |
* Take a totally mixed item and parse it into an array compatible with EE's Template library | |
* | |
* @access private | |
* @param mixed | |
* @return string | |
*/ | |
private function _force_array($var, $level = 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
preg_match('/^\/(cms|admin|manage)/', $_SERVER['REQUEST_URI'], $matches); | |
if ( ! empty($matches[1])) | |
{ | |
$config['sess_cookie_name'] = $matches[1].'_session'; | |
} | |
else | |
{ | |
$config['sess_cookie_name'] = 'user_session'; |
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 defined('SYSPATH') or die('No direct script access.'); | |
class Controller_Api extends Controller { | |
/** | |
* Handle a response from an api | |
*/ | |
public function response($status = 'success', $data = array()) | |
{ | |
$data = array_merge(array('status' => $status), $data); |
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
class Manage extends REST_Controller | |
{ | |
protected $rest_permissions = array( | |
'key_post' => 9 | |
); | |
function key_post() | |
{ | |
$this->response(array('foo' => 'BAR'), 200); | |
} |
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
class Template | |
{ | |
private $theme = 'default'; | |
function set_theme($theme) | |
{ | |
$this->theme = $theme; | |
} | |
function build($view, $data) |
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 | |
// Need to add 'activerecord' to your packages in config.php | |
namespace Fuel\Application; | |
use ActiveRecord; | |
class Model_User extends ActiveRecord\Model {} |