PHP 클래스 CI_Router, TastyIgniter

Parses URIs and determines routing
저자: EllisLab Dev Team
파일 보기 프로젝트 열기: tastyigniter/tastyigniter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$class string Current class name
$config object CI_Config class object
$default_controller string Default controller (and method if specific)
$directory string Sub-directory that contains the requested controller class
$enable_query_strings boolean Determines whether to use GET parameters or segment URIs
$method string Current method name
$routes array List of routes
$translate_uri_dashes boolean Determines whether dashes in controller & method segments should be automatically replaced by underscores.

공개 메소드들

메소드 설명
__construct ( array $routing = NULL ) : void Class constructor
fetch_class ( ) : string Fetch the current class
fetch_directory ( ) : string Fetch directory
fetch_method ( ) : string Fetch the current method
set_class ( string $class ) : void Set class name
set_directory ( string $dir, boolean $append = FALSE ) : void Set directory name
set_method ( string $method ) : void Set method name

보호된 메소드들

메소드 설명
_parse_routes ( ) : void Parse Routes
_set_default_controller ( ) : void Set default controller
_set_request ( array $segments = [] ) : void Set request route
_set_routing ( ) : void Set route mapping
_validate_request ( array $segments ) : mixed Validate request

메소드 상세

__construct() 공개 메소드

Runs the route mapping function.
public __construct ( array $routing = NULL ) : void
$routing array
리턴 void

_parse_routes() 보호된 메소드

Matches any routes that may exist in the config/routes.php file against the URI to determine if the class/method need to be remapped.
protected _parse_routes ( ) : void
리턴 void

_set_default_controller() 보호된 메소드

Set default controller
protected _set_default_controller ( ) : void
리턴 void

_set_request() 보호된 메소드

Takes an array of URI segments as input and sets the class/method to be called.
protected _set_request ( array $segments = [] ) : void
$segments array URI segments
리턴 void

_set_routing() 보호된 메소드

Determines what should be served based on the URI request, as well as any "routes" that have been set in the routing config file.
protected _set_routing ( ) : void
리턴 void

_validate_request() 보호된 메소드

Attempts validate the URI request and determine the controller path.
protected _validate_request ( array $segments ) : mixed
$segments array URI segments
리턴 mixed URI segments

fetch_class() 공개 메소드

Fetch the current class
사용 중단: 3.0.0 Read the 'class' property instead
public fetch_class ( ) : string
리턴 string

fetch_directory() 공개 메소드

Feches the sub-directory (if any) that contains the requested controller class.
사용 중단: 3.0.0 Read the 'directory' property instead
public fetch_directory ( ) : string
리턴 string

fetch_method() 공개 메소드

Fetch the current method
사용 중단: 3.0.0 Read the 'method' property instead
public fetch_method ( ) : string
리턴 string

set_class() 공개 메소드

Set class name
public set_class ( string $class ) : void
$class string Class name
리턴 void

set_directory() 공개 메소드

Set directory name
public set_directory ( string $dir, boolean $append = FALSE ) : void
$dir string Directory name
$append boolean Whether we're appending rather than setting the full value
리턴 void

set_method() 공개 메소드

Set method name
public set_method ( string $method ) : void
$method string Method name
리턴 void

프로퍼티 상세

$class 공개적으로 프로퍼티

Current class name
public string $class
리턴 string

$config 공개적으로 프로퍼티

CI_Config class object
public object $config
리턴 object

$default_controller 공개적으로 프로퍼티

Default controller (and method if specific)
public string $default_controller
리턴 string

$directory 공개적으로 프로퍼티

Sub-directory that contains the requested controller class
public string $directory
리턴 string

$enable_query_strings 공개적으로 프로퍼티

Determines whether to use GET parameters or segment URIs
public bool $enable_query_strings
리턴 boolean

$method 공개적으로 프로퍼티

Current method name
public string $method
리턴 string

$routes 공개적으로 프로퍼티

List of routes
public array $routes
리턴 array

$translate_uri_dashes 공개적으로 프로퍼티

Determines whether dashes in controller & method segments should be automatically replaced by underscores.
public bool $translate_uri_dashes
리턴 boolean