Properties

$admin

$admin : boolean

Stores information if it is on a Wordpress administrative page

Type

boolean

$ajax

$ajax : boolean

Stores information if it is on a Wordpress ajax page

Type

boolean

$logged

$logged : boolean

Stores information if someone is logged in

Type

boolean

$shortcode

$shortcode : boolean

Stores information if it is in a shortcode page of Wordpress

Type

boolean

$loginPage

$loginPage : boolean

Store information if you are on the Wordpress login page

Type

boolean

$pageNow

$pageNow : string

Stores the current wordpress page

Type

string

$blogAdmin

$blogAdmin : boolean

Checks if the current page is one of the blog's admin pages

Type

boolean

$mocaBonitaPage

$mocaBonitaPage : boolean

Checks if the current page is a page of MocaBonita

Type

boolean

Methods

isAdmin()

isAdmin() : boolean

Is admin

Returns

boolean

isAjax()

isAjax() : boolean

Is Ajax

Returns

boolean

isLogged()

isLogged() : boolean

is logged

Returns

boolean

isShortcode()

isShortcode() : boolean

Is shortcode

Returns

boolean

setShortcode()

setShortcode(boolean  $isShortcode) 

Set shortcode

Parameters

boolean $isShortcode

isLoginPage()

isLoginPage() : boolean

Is login page

Returns

boolean

getPageNow()

getPageNow() : string

Get page now

Returns

string

ajax()

ajax() : boolean

is ajax request

Returns

boolean

urlQuery()

urlQuery(array  $query) : string

Get the full URL for the request with the added a new query string parameters.

Parameters

array $query

Returns

string

getFlashBag()

getFlashBag() : \Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface

Returns

\Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface

session()

session() : \Symfony\Component\HttpFoundation\Session\Session|\Illuminate\Session\Store

Get the session associated with the request.

Throws

\RuntimeException

Returns

\Symfony\Component\HttpFoundation\Session\Session|\Illuminate\Session\Store

urlAction()

urlAction(string  $action, array  $query = array()) : string

Get the full URL with new action for the requests.

Parameters

string $action
array $query

Returns

string

urlPagination()

urlPagination(string  $pagination, array  $query = array()) : string

Get the full URL with new pagination for the requests.

Parameters

string $pagination
array $query

Returns

string

adminUrlQuery()

adminUrlQuery(array  $query, string  $adminPage = "admin.php") : string

Get the full URL admin with new query for the requests.

Parameters

array $query
string $adminPage

Returns

string

homeUrlQuery()

homeUrlQuery(array  $query, string  $homePage = "/") : string

Get the full URL home with new query for the requests.

Parameters

array $query
string $homePage

Returns

string

isCurrentAction()

isCurrentAction(string  $action) : boolean

Is current action

Parameters

string $action

Returns

boolean

isCurrentPage()

isCurrentPage(string  $page) : boolean

Is current page

Parameters

string $page

Returns

boolean

inputSource()

inputSource(string  $key = null, string|array|null  $default = null) : string|array

Retrieve an inputSource item from the request.

Parameters

string $key
string|array|null $default

Returns

string|array

allSource()

allSource() : array

Get all of the input and files for the request.

Returns

array

isBlogAdmin()

isBlogAdmin() : boolean

Checks if the current page is one of the blog's admin pages

Returns

boolean

setBlogAdmin()

setBlogAdmin(boolean  $blogAdmin) : \MocaBonita\tools\MbRequest

Set if the current page is one of the blog's admin pages

Parameters

boolean $blogAdmin

Returns

\MocaBonita\tools\MbRequest

hasQuery()

hasQuery(string|array  $key) : boolean

Determine if the request params contains a non-empty value for an input item.

Parameters

string|array $key

Returns

boolean

isMocaBonitaPage()

isMocaBonitaPage() : boolean

Check if the current page is a Mocabonita page

Returns

boolean

setMocaBonitaPage()

setMocaBonitaPage(boolean  $mocaBonitaPage) : \MocaBonita\tools\MbRequest

Parameters

boolean $mocaBonitaPage

Returns

\MocaBonita\tools\MbRequest