PHP 클래스 PHPFusion\Rewrite\Router

You can use this API to Add custom rules for handling requests
상속: extends RewriteDriver
파일 보기 프로젝트 열기: php-fusion/PHP-Fusion

공개 프로퍼티들

프로퍼티 타입 설명
$routing boolean True = SEF URL to FilePath False = File Path to SEF URL

공개 메소드들

메소드 설명
__construct ( )
getFilePath ( ) Index Include File
rewritePage ( ) Call all the functions to process rewrite detection and further actions.
setGetParameters ( mixed $get_parameters )
setPathtofile ( mixed $pathtofile )
setquerystring ( ) Set the new QUERY_STRING This function will set the values of QUERY_STRING to new value which is calculated in buildParams().
setservervars ( ) Set the PHP_SELF and SCRIPT_NAME to the suitable filepath.

보호된 메소드들

메소드 설명
makeSearchRegex ( string $pattern, string $type ) Builds the Regex pattern for a specific Type string

비공개 메소드들

메소드 설명
buildParams ( ) Builds the $_GET parameters This function will build the GET parameters and also the Query String.
checkAlias ( ) Checks if there is any matching Alias or not
checkAliasPatterns ( ) Checks if there is any matching Alias Pattern or not
checkPattern ( ) Builds the Regular Expressions Patterns
explodeURL ( string $url, string $param_delimiter = "&" ) Explodes a URL into Filename and Get Parameters
getAliasURL ( string $url, string $php_url, string $type ) Get Alias URL for Router This function will return an Array of 2 elements for a specific Alias: 1. The Permalink URL of Alias 2. PHP URL of the Alias
importPatterns ( ) Import the Available Patterns from Database
setVariables ( ) Call the Functions to Set GET Parameters and Query String This function will call the functions to set Server GET parameters and the QUERY_STRING.

메소드 상세

__construct() 공개 메소드

public __construct ( )

getFilePath() 공개 메소드

Returns the filename of the php file which will be included. If this file is blank, index.php will redirect to 404 error page
public getFilePath ( )

makeSearchRegex() 보호된 메소드

This function will build the Regex pattern for a specific string, which is passed to the function.
protected makeSearchRegex ( string $pattern, string $type )
$pattern string The String
$type string Type or Handler name

rewritePage() 공개 메소드

This will call all the other functions after all the included files have been included and all the patterns have been made.
public rewritePage ( )

setGetParameters() 공개 메소드

public setGetParameters ( mixed $get_parameters )
$get_parameters mixed

setPathtofile() 공개 메소드

public setPathtofile ( mixed $pathtofile )
$pathtofile mixed

setquerystring() 공개 메소드

Set the new QUERY_STRING This function will set the values of QUERY_STRING to new value which is calculated in buildParams().
public setquerystring ( )

setservervars() 공개 메소드

This function will set the values of PHP_SELF and SCRIPT_NAME to the suitable file name. The filename will be searched in the $pattern_replace array. The php filename is found before '?' in the pattern.
public setservervars ( )

프로퍼티 상세

$routing 공개적으로 프로퍼티

True = SEF URL to FilePath False = File Path to SEF URL
public bool $routing
리턴 boolean