PHP 클래스 CampURI

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_themePath The theme path storage
$m_article MetaArticle Article object
$m_buildPath string
$m_buildQuery string
$m_buildQueryArray array
$m_config object
$m_errorCode integer Holds the URL process error code; null if no error
$m_fragment string
$m_host string
$m_issue MetaIssue Issue object
$m_language MetaLanguage Language object
$m_objects
$m_parts array The URI parts
$m_password string
$m_path string
$m_port integer
$m_preview boolean True if in preview mode
$m_previewParameters array The list of parameters used in preview mode
$m_publication MetaPublication Publication object
$m_query string
$m_scheme string
$m_section MetaSection Section object
$m_template MetaTemplate Template object
$m_type integer The URI type It can be either: Template Path = 1 Short Names = 2
$m_uri string The URI value
$m_user MetaUser
$m_validURI boolean Whether the URI is valid or not

공개 메소드들

메소드 설명
GetPreviewParameters ( )
__construct ( string $p_uri = 'SELF' ) Class constructor
__get ( string $p_property ) : boolean Sets an object property
__set ( string $p_property, mixed $p_value ) : boolean Sets an object property
getBase ( ) : string Gets the URI base, it is the scheme, host and (if exists) port.
getBasePath ( ) : string Gets the base plus the path from the current URI.
getCampsiteVector ( ) : array Returns campsite params: language, publication, issue, section, article.
getErrorCode ( ) : integer Returns the URL processing error code
getFragment ( ) : string Gets the fragment part from the current URI.
getHost ( ) : string Gets the host part from the current URI.
getPassword ( ) : string Gets the password part from the current URI.
getPath ( ) : string Gets the path part from the current URI.
getPort ( ) : integer Gets the port part from the current URI.
getQuery ( ) : string Gets the query part from the current URI.
getQueryArray ( array $p_keepParameters = [], array $p_removeParameters = [] ) : array Gets the array containing the query variables.
getQueryVar ( string $p_varName ) : string Gets the given variable from the URI query.
getRelativeBase ( ) : string Gets the relative URI base, it is '//', host and (if exists) port.
getRequestURI ( ) : string Gets the requested URI.
getScheme ( ) : string Gets the scheme part from the current URI.
getTemplate ( $p_templateIdOrName = null )
getThemePath ( )
getURI ( string $p_param = null, boolean $p_preview = false ) : string Returns the URI string based on given URL parameter.
getURIPath ( string $p_param = null, boolean $p_preview = false ) : string Returns the URI path based on given URL parameter.
getURL ( ) : string Gets the URL from the object attributes.
getURLParameters ( string $p_param = null, boolean $p_preview = false ) : string Returns the URI query parameters based on given URL parameter.
getURLType ( ) : integer Gets the URL type.
getUser ( ) : string Returns the user part from the current URI.
isRestrictedParameter ( string $p_parameterName ) : boolean Returns true if the given parameter is restricted and can not be set from outside the URL object.
isSSL ( ) : boolean Returns whether the site is running over SSL or not.
setFragment ( string $p_fragment ) : void Sets the URI fragment.
setHost ( string $p_host ) : void Sets the URI host.
setPassword ( $p_password ) : void Sets the URI password part.
setPath ( string $p_path ) : void Sets the URI path.
setPort ( integer $p_port ) : void Sets the URI port.
setQuery ( $p_query ) : void Gets the query part from the current URI.
setQueryVar ( string $p_varName, string $p_value = null ) : void Sets the given URI query variable.
setScheme ( string $p_scheme ) : void Sets the URI scheme.
setUser ( string $p_user ) : void Sets the URI user part.

보호된 메소드들

메소드 설명
QueryArrayToString ( array $p_queryArray, $p_HTMLEscape = true ) : string Builds a URI query string from the given query array.
addToQuery ( &$p_query, array $p_parameters ) Adds the given parameters to the query array
buildURI ( array &$p_params = [], boolean $p_preview = false ) : void Sets the URI path and query values based on given parameters.
clearParams ( array $parameters )
isValidCache ( ) : boolean Returns the cache valid state
isValidTemplate ( string $p_templateName ) : boolean Returns whether the template name given is a valid template resource.
render ( array $p_parts = [] ) : string Builds a URI string from the given parts.
resetList ( $listIdPrefix )
setURLType ( integer $p_type ) : void Sets the URL type.
validateCache ( boolean $p_valid ) Sets the cache validation for URI rendering

비공개 메소드들

메소드 설명
parse ( string $p_uri ) : boolean Parses the given URI.
processImageOptions ( integer &$p_imageNo, array $p_params ) Process the image options given in the new format: where may be one of: number, ratio, width, height and an integer
processOldImageOptions ( integer &$p_imageNo, array $p_params ) Process the image options given in the old format (for compatibility): [ []] or: [ [width | height ]
readUser ( )

메소드 상세

GetPreviewParameters() 공개 정적인 메소드

public static GetPreviewParameters ( )

QueryArrayToString() 보호된 정적인 메소드

Builds a URI query string from the given query array.
protected static QueryArrayToString ( array $p_queryArray, $p_HTMLEscape = true ) : string
$p_queryArray array An array of query variables
리턴 string $queryString The generated query string

__construct() 공개 메소드

Class constructor
public __construct ( string $p_uri = 'SELF' )
$p_uri string The full URI string

__get() 공개 메소드

Sets an object property
public __get ( string $p_property ) : boolean
$p_property string
리턴 boolean

__set() 공개 메소드

Sets an object property
public __set ( string $p_property, mixed $p_value ) : boolean
$p_property string
$p_value mixed
리턴 boolean

addToQuery() 보호된 메소드

Adds the given parameters to the query array
protected addToQuery ( &$p_query, array $p_parameters )
$p_parameters array

buildURI() 보호된 메소드

Sets the URI path and query values based on given parameters.
protected buildURI ( array &$p_params = [], boolean $p_preview = false ) : void
$p_params array An array of valid URL parameters
$p_preview boolean If true, will keep the preview parameters in the URL
리턴 void

clearParams() 보호된 메소드

protected clearParams ( array $parameters )
$parameters array

getBase() 공개 메소드

Gets the URI base, it is the scheme, host and (if exists) port.
public getBase ( ) : string
리턴 string $base The URI base

getBasePath() 공개 메소드

Gets the base plus the path from the current URI.
public getBasePath ( ) : string
리턴 string The URI base path

getCampsiteVector() 공개 메소드

Returns campsite params: language, publication, issue, section, article.
public getCampsiteVector ( ) : array
리턴 array

getErrorCode() 공개 메소드

Returns the URL processing error code
public getErrorCode ( ) : integer
리턴 integer

getFragment() 공개 메소드

Gets the fragment part from the current URI.
public getFragment ( ) : string
리턴 string $m_fragment The fragment value

getHost() 공개 메소드

Gets the host part from the current URI.
public getHost ( ) : string
리턴 string $m_host The host value

getPassword() 공개 메소드

Gets the password part from the current URI.
public getPassword ( ) : string
리턴 string $m_password The password value

getPath() 공개 메소드

Gets the path part from the current URI.
public getPath ( ) : string
리턴 string $m_path The path value

getPort() 공개 메소드

Gets the port part from the current URI.
public getPort ( ) : integer
리턴 integer $m_port The port value

getQuery() 공개 메소드

Gets the query part from the current URI.
public getQuery ( ) : string
리턴 string $m_query The query part

getQueryArray() 공개 메소드

Gets the array containing the query variables.
public getQueryArray ( array $p_keepParameters = [], array $p_removeParameters = [] ) : array
$p_keepParameters array
$p_removeParameters array
리턴 array $m_queryArray The array of query vars

getQueryVar() 공개 메소드

Gets the given variable from the URI query.
public getQueryVar ( string $p_varName ) : string
$p_varName string The variable name
리턴 string null on failure, otherwise the variable value

getRelativeBase() 공개 메소드

Gets the relative URI base, it is '//', host and (if exists) port.
public getRelativeBase ( ) : string
리턴 string $relativeBase The relative URI base

getRequestURI() 공개 메소드

Gets the requested URI.
public getRequestURI ( ) : string
리턴 string The requested URI string

getScheme() 공개 메소드

Gets the scheme part from the current URI.
public getScheme ( ) : string
리턴 string $m_scheme The scheme value

getTemplate() 공개 메소드

public getTemplate ( $p_templateIdOrName = null )

getThemePath() 공개 메소드

public getThemePath ( )

getURI() 공개 메소드

Returns the URI string based on given URL parameter.
public getURI ( string $p_param = null, boolean $p_preview = false ) : string
$p_param string The URL parameter
$p_preview boolean If true, will keep the preview parameters in the URL
리턴 string The URI string requested

getURIPath() 공개 메소드

Returns the URI path based on given URL parameter.
public getURIPath ( string $p_param = null, boolean $p_preview = false ) : string
$p_param string The URL parameter
$p_preview boolean If true, will keep the preview parameters in the URL
리턴 string The URI path string requested

getURL() 공개 메소드

Gets the URL from the object attributes.
public getURL ( ) : string
리턴 string $url The full URL

getURLParameters() 공개 메소드

Returns the URI query parameters based on given URL parameter.
public getURLParameters ( string $p_param = null, boolean $p_preview = false ) : string
$p_param string
$p_preview boolean If true, will keep the preview parameters in the URL
리턴 string The URI query string requested

getURLType() 공개 메소드

Gets the URL type.
public getURLType ( ) : integer
리턴 integer

getUser() 공개 메소드

Returns the user part from the current URI.
public getUser ( ) : string
리턴 string The username value

isRestrictedParameter() 추상적인 공개 메소드

Returns true if the given parameter is restricted and can not be set from outside the URL object.
abstract public isRestrictedParameter ( string $p_parameterName ) : boolean
$p_parameterName string
리턴 boolean

isSSL() 공개 메소드

Returns whether the site is running over SSL or not.
public isSSL ( ) : boolean
리턴 boolean true on success, false on failure

isValidCache() 보호된 메소드

Returns the cache valid state
protected isValidCache ( ) : boolean
리턴 boolean

isValidTemplate() 보호된 메소드

Returns whether the template name given is a valid template resource.
protected isValidTemplate ( string $p_templateName ) : boolean
$p_templateName string The name of the template from the URI path
리턴 boolean true on success, false on failure

render() 보호된 메소드

Builds a URI string from the given parts.
protected render ( array $p_parts = [] ) : string
$p_parts array The array of URI parts
리턴 string $uriString The rendered URI

resetList() 보호된 메소드

protected resetList ( $listIdPrefix )

setFragment() 공개 메소드

Sets the URI fragment.
public setFragment ( string $p_fragment ) : void
$p_fragment string The fragment part
리턴 void

setHost() 공개 메소드

Sets the URI host.
public setHost ( string $p_host ) : void
$p_host string The host name
리턴 void

setPassword() 공개 메소드

Sets the URI password part.
public setPassword ( $p_password ) : void
리턴 void

setPath() 공개 메소드

Sets the URI path.
public setPath ( string $p_path ) : void
$p_path string The path
리턴 void

setPort() 공개 메소드

Sets the URI port.
public setPort ( integer $p_port ) : void
$p_port integer The port number
리턴 void

setQuery() 공개 메소드

Gets the query part from the current URI.
public setQuery ( $p_query ) : void
리턴 void $m_query The query value

setQueryVar() 공개 메소드

Sets the given URI query variable.
public setQueryVar ( string $p_varName, string $p_value = null ) : void
$p_varName string The name of the URI query variable
$p_value string The value for the variable
리턴 void

setScheme() 공개 메소드

Sets the URI scheme.
public setScheme ( string $p_scheme ) : void
$p_scheme string The scheme value
리턴 void

setURLType() 보호된 메소드

Sets the URL type.
protected setURLType ( integer $p_type ) : void
$p_type integer The URL type number
리턴 void

setUser() 공개 메소드

Sets the URI user part.
public setUser ( string $p_user ) : void
$p_user string The user name
리턴 void

validateCache() 보호된 메소드

Sets the cache validation for URI rendering
protected validateCache ( boolean $p_valid )
$p_valid boolean

프로퍼티 상세

$_themePath 보호되어 있는 프로퍼티

The theme path storage
protected $_themePath

$m_article 보호되어 있는 프로퍼티

Article object
protected MetaArticle $m_article
리턴 MetaArticle

$m_buildPath 보호되어 있는 프로퍼티

protected string $m_buildPath
리턴 string

$m_buildQuery 보호되어 있는 프로퍼티

protected string $m_buildQuery
리턴 string

$m_buildQueryArray 보호되어 있는 프로퍼티

protected array $m_buildQueryArray
리턴 array

$m_config 보호되어 있는 프로퍼티

protected object $m_config
리턴 object

$m_errorCode 보호되어 있는 프로퍼티

Holds the URL process error code; null if no error
protected int $m_errorCode
리턴 integer

$m_fragment 보호되어 있는 프로퍼티

protected string $m_fragment
리턴 string

$m_host 보호되어 있는 프로퍼티

protected string $m_host
리턴 string

$m_issue 보호되어 있는 프로퍼티

Issue object
protected MetaIssue $m_issue
리턴 MetaIssue

$m_language 보호되어 있는 프로퍼티

Language object
protected MetaLanguage $m_language
리턴 MetaLanguage

$m_objects 보호되어 있는 정적으로 프로퍼티

protected static $m_objects

$m_parts 보호되어 있는 프로퍼티

The URI parts
protected array $m_parts
리턴 array

$m_password 보호되어 있는 프로퍼티

protected string $m_password
리턴 string

$m_path 보호되어 있는 프로퍼티

protected string $m_path
리턴 string

$m_port 보호되어 있는 프로퍼티

protected int $m_port
리턴 integer

$m_preview 보호되어 있는 프로퍼티

True if in preview mode
protected bool $m_preview
리턴 boolean

$m_previewParameters 보호되어 있는 정적으로 프로퍼티

The list of parameters used in preview mode
protected static array $m_previewParameters
리턴 array

$m_publication 보호되어 있는 프로퍼티

Publication object
protected MetaPublication $m_publication
리턴 MetaPublication

$m_query 보호되어 있는 프로퍼티

protected string $m_query
리턴 string

$m_scheme 보호되어 있는 프로퍼티

protected string $m_scheme
리턴 string

$m_section 보호되어 있는 프로퍼티

Section object
protected MetaSection $m_section
리턴 MetaSection

$m_template 보호되어 있는 프로퍼티

Template object
protected MetaTemplate $m_template
리턴 MetaTemplate

$m_type 보호되어 있는 프로퍼티

The URI type It can be either: Template Path = 1 Short Names = 2
protected int $m_type
리턴 integer

$m_uri 보호되어 있는 프로퍼티

The URI value
protected string $m_uri
리턴 string

$m_user 보호되어 있는 프로퍼티

protected MetaUser $m_user
리턴 MetaUser

$m_validURI 보호되어 있는 프로퍼티

Whether the URI is valid or not
protected bool $m_validURI
리턴 boolean