Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezuritool.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: ezuritool.php 6200 2001-07-19 11:33:57Z jakobn $
5 //
6 // Definition of eZURITool class
7 //
8 // Created on: <16-Jan-2001 10:59:46 amos>
9 //
10 // This source file is part of Exponential Basic, publishing software.
11 //
12 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
31
51 class eZURITool
52 {
58 static public function &split( &$uri )
59 {
60 $uri_array = explode( "/", $uri );
61 return $uri_array;
62 }
63
69 static public function &merge( &$uri_array )
70 {
71 $uri = implode( "/", $uri_array );
72 return $uri;
73 }
74
81 static public function &decode( &$text )
82 {
83 $text = preg_replace( "/%([0-9a-fA-F]{2})/", "".chr(hexdec('\\1'))."", $text );
84 return $text;
85 }
86
93 static public function &encode( &$text )
94 {
95 $text = preg_replace( '/\\\\"/', '"', $text );
96 $text = preg_replace( "/([ \"'&%])/", "%".bin2hex('\\1')."", $text );
97 return $text;
98 }
99 }
100
101 ?>
$uri
$uri
Definition: activate.php:71
eZURITool
Definition: ezuritool.php:52
eZURITool\decode
static & decode(&$text)
Definition: ezuritool.php:81
eZURITool\split
static & split(&$uri)
Definition: ezuritool.php:58
eZURITool\merge
static & merge(&$uri_array)
Definition: ezuritool.php:69
eZURITool\encode
static & encode(&$text)
Definition: ezuritool.php:93
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.