Skip to content

Instantly share code, notes, and snippets.

View walesmd's full-sized avatar

Michael Wales walesmd

View GitHub Profile
[14:44] <maitrebn> Hi ! I'm using CI with Doctrine and I can't find any way to log error from Doctrine ...
[14:44] <walesmd> Sounds like a question for #doctrine
[14:45] <walesmd> Whatever doctrine uses to give you errors, if they don't offer a logging mechanism wrap it in CI log_error() function.
[14:46] <maitrebn> walesmd, as it's working with other framework ...
[14:46] * walesmd is not a Doctrine expert - never used it before.
[14:46] <walesmd> log_error(1, $Doctrines_variable_for_errors);
[14:46] <maitrebn> walesmd, i do not know log_error() so I'm will look !
[14:46] <walesmd> http://codeigniter.com/user_guide/general/errors.html
[14:47] <walesmd> log_message() actually
[14:47] <maitrebn> walesmd, It just stop ... I'm not sure to retreive any doctrine value ...
<?php
class Pages extends Controller {
function index($page) {
switch ($page) {
'plant_hire':
$this->planthire();
break;
@walesmd
walesmd / MY_Model.php
Created December 6, 2010 03:18
CodeIgniter extended Model Class
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
/* MY_Model
* Reorganizes the $DB::result() object passed to it so joined
* tables are child-objects of the result object, rather than
* first-class variables. Pretty strict on the way it works.
*
* Example:
* protected $relationships = array(
* 'has_one' => array(
<?php
class Hello extends Controller {
function index() {
$data['partial'] = 'hello/index';
$this->load->view('layout', $data);
}
}
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
game.running = true
player = {}
player.x = game.width / 2
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
game.running = true
player = {}
player.x = game.width / 2
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
player = {}
player.x = game.width / 2
player.y = game.height / 2
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
player = {}
player.x = game.width / 2
player.y = game.height / 2
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
player = {}
player.x = game.width / 2
player.y = game.height / 2
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
player = {}
player.x = game.width / 2
player.y = game.height / 2