Skip to content
Snippets Groups Projects
Commit 838c6767 authored by alvaro's avatar alvaro
Browse files

Added Urifier and Deurifier which allows you to convert a URI and pass it to a service

parent e68c62fa
No related branches found
No related tags found
No related merge requests found
<?php
class Haanga_Extension_Filter_Deurifier
{
static function main($uri)
{
$newUri = preg_replace('/^http\//', 'http://', $uri);
$newUri = preg_replace('/__hash__/', '#', $newUri);
$newUri = preg_replace('/__qmark__/', '?', $newUri);
return $newUri;
}
}
<?php
class Haanga_Extension_Filter_Urifier
{
static function main($uri)
{
$newUri = preg_replace('/^http:\/\//', 'http/', $uri);
$newUri = preg_replace('/#/', '__hash__', $newUri);
$newUri = preg_replace('/\?/', '__qmark__', $newUri);
return $newUri;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment