-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
o Updated how 500 errors are generated. Updated URI Helper, added so…
…me view-specific stuff to make it more useful.
- Loading branch information
Showing
3 changed files
with
98 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,79 @@ | ||
<?php | ||
class halo_helper_UriHelper { | ||
|
||
require_once('dd_uri_Uri.php'); | ||
|
||
class halo_helper_UriHelper extends dd_uri_Uri { | ||
|
||
/** | ||
* Print an HTML escaped URI | ||
* @see dd_uri_Uri::get() | ||
*/ | ||
public function p() { | ||
$args = func_get_args(); | ||
print htmlspecialchars(call_user_func_array(array($this, 'get'), $args)); | ||
} | ||
|
||
/** | ||
* Print a URI | ||
* @see dd_uri_Uri::get() | ||
*/ | ||
public function pRaw() { | ||
$args = func_get_args(); | ||
print call_user_func_array(array($this, 'get'), $args); | ||
} | ||
|
||
/** | ||
* Print an HTML escaped site URI | ||
* @see dd_uri_Uri::getSite() | ||
*/ | ||
public function pSite() { | ||
$args = func_get_args(); | ||
print htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args)); | ||
} | ||
|
||
/** | ||
* Print a site URI | ||
* @see dd_uri_Uri::getSite() | ||
*/ | ||
public function pSiteRaw() { | ||
$args = func_get_args(); | ||
print call_user_func_array(array($this, 'getSite'), $args); | ||
} | ||
|
||
/** | ||
* Get an HTML escaped URI | ||
* @see dd_uri_Uri::get() | ||
*/ | ||
public function g() { | ||
$args = func_get_args(); | ||
return htmlspecialchars(call_user_func_array(array($this, 'get'), $args)); | ||
} | ||
|
||
/** | ||
* Get a URI | ||
* @see dd_uri_Uri::get() | ||
*/ | ||
public function gRaw() { | ||
$args = func_get_args(); | ||
return call_user_func_array(array($this, 'get'), $args); | ||
} | ||
|
||
/** | ||
* Get an HTML escaped site URI | ||
* @see dd_uri_Uri::getSite() | ||
*/ | ||
public function gSite() { | ||
$args = func_get_args(); | ||
return htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args)); | ||
} | ||
|
||
/** | ||
* Get a site URI | ||
* @see dd_uri_Uri::getSite() | ||
*/ | ||
public function gSiteRaw() { | ||
$args = func_get_args(); | ||
return call_user_func_array(array($this, 'getSite'), $args); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters