Skip to content

Instantly share code, notes, and snippets.

@Tapha
Tapha / gist:009f0bb07eff4fef13d5
Created June 18, 2014 15:20
Createdate controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Createdate extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('ion_auth');
$this->load->model('Users');
$this->load->model('Podcast');
@Tapha
Tapha / gist:9fec855e2d2fd39bb3c8
Last active August 29, 2015 14:02
Podcast Controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Podcasts extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('ion_auth');
$this->load->model('Podcast');
$this->load->helper('url');
@Tapha
Tapha / gist:0035c87b1af1a6defcdf
Created June 18, 2014 15:12
A model that i implemented to manage scheduling in my app (podigniter.com)
<?php
class Scheduler extends CI_Model {
//var $title = '';
//var $content = '';
//var $date = '';
function __construct()
{
// Call the Model constructor
@Tapha
Tapha / oo.php
Created September 22, 2010 13:18 — forked from dhotson/oo.php
<?php
// Define the 'class' class
$class = Obj()
->fn('new', function ($class) {
$newClass = Obj($class->methods)
->fn('new', function($class) {
$obj = Obj($class->imethods);
$args = func_get_args();
array_shift($args);