Overview

Packages

  • tipy

Classes

  • Tipy
  • TipyApp
  • TipyCli
  • TipyCliSession
  • TipyConfig
  • TipyController
  • TipyCookie
  • TipyDAO
  • TipyEnv
  • TipyFlash
  • TipyInflector
  • TipyInput
  • TipyIOWrapper
  • TipyLogger
  • TipyMailer
  • TipyModel
  • TipyOutput
  • TipyRequest
  • TipySession
  • TipyTestCase
  • TipyTestRunner
  • TipyView

Exceptions

  • AssertionFailedException
  • CompileErrorException
  • CompileWarningException
  • CoreErrorException
  • CoreWarningException
  • DeprecatedException
  • NoMethodException
  • NoticeException
  • ParseException
  • RecoverableErrorException
  • StrictException
  • TipyDaoException
  • TipyException
  • TipyModelException
  • TipyRollbackException
  • TipyValidationException
  • UserDeprecatedException
  • UserErrorException
  • UserNoticeException
  • UserWarningException
  • WarningException
  • Overview
  • Package
  • Class
  • Deprecated
  • Todo

Class TipyRequest

Access request and its header

By default it is a TipyIOWrapper around $_SERVER superglobal

class MyController extends TipyController {
    public function index() {
        $requestIsPost = $this->request->isPost();
        $userAgent = $this->request->get('HTTP_USER_AGENT');
        // ...
    }
}
TipyIOWrapper
Extended by TipyRequest
Package: tipy
See: TipyIOWrapper
Located at src/TipyRequest.php
Methods summary
public
# __construct( )

Construct TipyRequest instance from $_SERVER

Construct TipyRequest instance from $_SERVER

Overrides

TipyIOWrapper::__construct()
public string
# uri( )

Request URI

Request URI

Returns

string
public string
# method( )

Return request method: GET,POST,DELETE,etc...

Return request method: GET,POST,DELETE,etc...

Returns

string
public boolean
# isGet( )

Return true if request is a GET request

Return true if request is a GET request

Returns

boolean
public boolean
# isPost( )

Return true if request is a POST request

Return true if request is a POST request

Returns

boolean
public boolean
# isXhr( )

Returns true if request is AJAX request

Returns true if request is AJAX request

Returns

boolean
public boolean
# isPut( )

Return true if request is a PUT request

Return true if request is a PUT request

Returns

boolean
public boolean
# isDelete( )

Return true if request is a DELETE request

Return true if request is a DELETE request

Returns

boolean
public boolean
# isOptions( )

Return true if request is a OPTIONS request

Return true if request is a OPTIONS request

Returns

boolean
public boolean
# isHead( )

Return true if request is a HEAD request

Return true if request is a HEAD request

Returns

boolean
public string
# ip( boolean $trust_proxy_headers = false )

Returns the IP address of the client.

Returns the IP address of the client.

Parameters

$trust_proxy_headers

Whether or not to trust the proxy headers HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR. ONLY use if your server is behind a proxy that sets these values

Returns

string
Methods inherited from TipyIOWrapper
bind(), clear(), get(), getAll(), set()
tipy API documentation generated by ApiGen