All pastes #959908 Raw Edit

Unnamed

public php v1 · immutable
#959908 ·published 2008-03-27 19:28 UTC
rendered paste body
/app_controller.php<?phpclass AppController extends Controller {	var $uses = array('ip2c');	var $components = array('Country');		function beforeFilter() {		var_dump($this->Country->getCountry('nld'));	}}?>components/country.php<?phpclass CountryComponent extends Object {	var $disableStartup = False;	var $controller = array();	function startup(&$controller) {		$this->controller = $controller;		echo '1';	}	function getCountry($range) {		return $this->ip2c->findAllByIso($range, $database);	}	function getRanges($country) {			}}?>models/ip2c.php<?phpclass ip2c extends AppModel {	var $useTable = 'ip2c';}?>