CMC for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • cmc
    • core
      • ui
    • db
      • mysqli
    • error
    • ui
      • widgets
  • PHP

Classes

  • cache
  • request
  • translation

Interfaces

  • IClonable
  • ISerializable

CMC for PHP is a web framework for PHP.
Copyright (c) 2014 by Calmarsoft company http://calmarsoft.com (FRANCE). All rights reserved.
Project information available here.

Class request

handles operations about the request

Namespace: cmc\core
Copyright: Copyright (c) Calmarsoft company (FRANCE) (http://calmarsoft.com)
License: GNU General Public License version 3
Version: 0.9
Link: CMC Project
Located at core/request.php

Methods summary

public static
# rootphyspath( )

physical path of the application's root. This is taken from the "main" php script path.

physical path of the application's root. This is taken from the "main" php script path.

public static
# rootpath( )

logical root path of the application; i.e. the path known to the client

logical root path of the application; i.e. the path known to the client

public static
# requestURI( )

request uri (cached)

request uri (cached)

public static
# rootpath_short( )

same as request::rootpath() but without begining or trailing '/'

same as request::rootpath() but without begining or trailing '/'

public
# relocate_path( type $url, mixed $viewpath, mixed $matpath = cmc\core\config::MAT_path, mixed $absolute = cmc\core\config::URL_absolute )

relocates a path from root and view path

relocates a path from root and view path

Parameters

$url
type
string
$viewpath
$matpath
$absolute
public
# __construct( mixed $app )
public
# testRequestPath( string $lang, string $path )

tests if a path is illegible

tests if a path is illegible

Parameters

$lang
string
language
$path
string
path
public string|false
# getViewPath( )

retrives the view path (unlocalized)

retrives the view path (unlocalized)

Returns

string|false
public string|false
# getPath( )

retrieves the request path (with REST part)

retrieves the request path (with REST part)

Returns

string|false
public string|false
# getReqPath( )

retrieves the request path (with REST part and with prefix)

retrieves the request path (with REST part and with prefix)

Returns

string|false
public string|false
# getReqParams( )

retrieves the request parameters

retrieves the request parameters

Returns

string|false
public string|false
# getRESTItems( )

retrieves the request REST parameters

retrieves the request REST parameters

Returns

string|false
public string|false
# getParams( )

retrieves both REST and standard parametrs

retrieves both REST and standard parametrs

Returns

string|false
public
# getParam( type $parmname )

retrieves a parameter from REST and standard parametrs

retrieves a parameter from REST and standard parametrs

Parameters

$parmname
type
$parmname
public
# getLangUrl( )
public
# getAccept( )

what kind of file/media/document is accepted by the client

what kind of file/media/document is accepted by the client

Retrun

string
public integer
# getContentType( integer|false $pref = false )

retrieves the contentype to return from a preference

retrieves the contentype to return from a preference

for example self::type_html

Parameters

$pref
integer|false
$pref preferred content type, or false if none

Returns

integer
content type
public string
# getContentMatch( integer|false $pref = false )

retrieves the contenmatch to return from a preference

retrieves the contenmatch to return from a preference

for example 'image/png'

Parameters

$pref
integer|false
$pref preferred content type, or false if none

Returns

string
content match
public boolean
# setAnswerType( integer $type )

sets an answer type (like 'image/png') from an answer type or false if none is accepted by the client

sets an answer type (like 'image/png') from an answer type or false if none is accepted by the client

Parameters

$type
integer
the content type

Returns

boolean
public string
# getAnswerType( )

retrieves the selected answer type

retrieves the selected answer type

Returns

string
public
# renderImage( binary $img )

renders a image answer according to client needs

renders a image answer according to client needs

Parameters

$img
binary
image data
public static string
# getAcceptLanguage( )

retrieves the "acceptLanguage" item

retrieves the "acceptLanguage" item

Returns

string
public static
# getClientInformation( )

retrives the navigator information

retrives the navigator information

public static
# getClientMozVersion( )
public static
# getClientIEVersion( )
public static string|false
# getAcceptPrimaryLang( )

retrieves a preferred language

retrieves a preferred language

Returns

string|false
public string
# getMethod( )

retrieves the request method (POST, GET, PUT, ...)

retrieves the request method (POST, GET, PUT, ...)

Returns

string
public boolean
# isPost( )

is this request a POST?

is this request a POST?

Returns

boolean
public boolean
# isGet( )

is this request a GET?

is this request a GET?

Returns

boolean
public static boolean
# isSSL( )

test if connection is secure

test if connection is secure

Returns

boolean
public boolean
# hasUpload( )

is this request containing upload?

is this request containing upload?

Returns

boolean

Magic methods summary

Constants summary

integer type_html 1
#

html content type

html content type

integer type_image 2
#

image content type

image content type

Properties summary

protected static mixed $Request_URI
#

request URI

request URI

CMC for PHP API documentation generated by ApiGen 2.8.0