[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/classes/ -> url.class.php (sommaire)

(pas de description)

Poids: 229 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

url:: (8 méthodes):
  url()
  _getArguments()
  setEnabled()
  isEnabled()
  numArguments()
  setArgNames()
  getArgument()
  buildURL()


Classe: url  - X-Ref

This class will allow you to use friendlier URL's, like:
http://www.example.com/index.php/arg_value_1/arg_value_2/ instead of
uglier http://www.example.com?arg1=value1&arg2=value2.
NOTE: this does not currently work under windows as there is a well documented
bug with IIS and PATH_INFO.  Not sure yet if this will work with windows under
apache.  This was built so you could use this class and just disable it
if you are an IIS user.

url($enabled=true)   X-Ref
Constructor

param: boolean     $enabled    whether rewriting is enabled

_getArguments()   X-Ref
Grabs any variables from the query string


setEnabled($switch)   X-Ref
Enables url rewriting, otherwise URL's are passed back

param: boolean     $switch     turns URL rewriting on/off

isEnabled()   X-Ref
Returns whether or not URL rewriting is enabled

return: boolean true if URl rewriting is enabled, otherwise false

numArguments()   X-Ref
Returns the number of variables found in query string

This is particularly useful just before calling setArgNames() method

return: int     Number of arguments found in URL

setArgNames($names)   X-Ref
Assigns logical names to query string variables

param: array       $names      String array of names to assign to variables pulled from query string
return: boolean     true on success otherwise false

getArgument($name)   X-Ref
Gets the value for an argument

param: string      $name       Name of argument to fetch value for
return: mixed       returns value for a given argument

buildURL($url)   X-Ref
Builds crawler friendly URL if URL rewriting is enabled

This function will attempt to build a crawler friendly URL.  If this feature is
disabled because of platform issue it just returns original $url value

param: string      $url    URL to try and convert
return: string      rewritten if _isenabled is true otherwise original url



Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics