Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (16 sloc) 781 Bytes

Frisker

DESCRIPTION

Firsker is an extension of CI_Parser. It is for CodeIgniter 2.0 ONLY.

It adds some additional functionality to the base Parser library.

INSTALLATION

1. Copy MY_Parser_.php to your application/libraries folder.
2. Load it like normal: $this->load->library('parser');

USAGE

You can now use PHP functions in your template:

{date("F j, Y, g:i a")}
{strtoupper($name)}

You can also pass the parse() function a string of data, instead of a view. You just need to set the 4th parameter to FALSE:

$data = array();
$body = $this->db->get_where('pages', array('id' => 4))->row()->body;
$body = $this->parser->parse($body, $data, TRUE, FALSE);