Skip to content

Instantly share code, notes, and snippets.

@rynop
Created February 1, 2011 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rynop/806480 to your computer and use it in GitHub Desktop.
Save rynop/806480 to your computer and use it in GitHub Desktop.
<?php
debug('wtf');
/**
* Application level View Helper
*
* This file is application-wide helper file. You can put all
* application-wide helper-related methods here.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake
* @subpackage cake.cake
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('View', 'Helper', false);
/**
* This is a placeholder class.
* Create the same file in app/app_helper.php
*
* Add your application-wide methods in the class below, your helpers
* will inherit them.
*
* @package cake
* @subpackage cake.cake
*/
class AppHelper extends Helper {
/**
* url method
*
* Use the UrlCache class
*
* @param mixed $url
* @param bool $full
* @return void
* @access public
*/
public function url($url = null, $full = false) {
debug($url);
exit();
if (empty($this->_urlCache)) {
if (!App::import('Vendor', 'Mi.UrlCache')) {
return Router::url($url);
}
$this->_urlCache =& UrlCache::getInstance();
}
return $this->_urlCache->url($url, $full);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment