This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Library_Request

An object that represents a particular request to the Concrete-powered website. The request object then determines what is being requested, based on the path, and presents itself to the rest of the dispatcher (which loads the page, etc...)

Direct known subclasses

Request

Package: Core
Category: Concrete
Copyright: Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
License: MIT License
Author: Andrew Embler andrew@concrete5.org
Located at core/libraries/request.php

Methods summary

protected static boolean|string
# parsePathFromRequest( string $var )

Parses the current request and returns an object with tasks, tools, etc... defined in them for use in the dispatcher Thanks to Code Igniter for some of this code (in terms of getenv(), etc...)

public
# __construct( string $path )

Request Constructor that we pass the requested path and then parse to get our tasks

public static Request
# get( )

Gets a request object for the current request. Parses PATH_INFO as necessary.

public
public
public
public
public
public Page
# getRequestedPage( )

Our new MVC way of doing things. Parses the collection path using like to find where the path stops and the parameters start. Enables us to use urls without a task/param separator in them

protected
# parse( )

This is where we parse the path to see if it is a tool or page and if its a page get the task and parameters (if there are any)

public string
# getRequestPath( )

Gets the path of the current request

public string
# getRequestCollectionPath( )

Gets the current collection path as contained in the current request

public integer
# getRequestCollectionID( )

Gets page ID of the current request

public string
# getRequestTask( )

Gets the current MVC task of the request

public string
# getRequestTaskParameters( )

Gets a string of parameters for this current MVC task

public boolean
# isIncludeRequest( )

Returns whether this request wants to include a file (typically a tool)

public string
# getIncludeType( )

Gets the include type of the current request

public string
# getFilename( )

If the current request wants to include a file, this returns the filename it wants to include

public string
# getBlock( )

Gets the block requested by the current request

public stdClass
# getAuxiliaryData( )

Auxiliary data is anything that the request specifies that doesn't really fit inside the request object, but gets passed along anyway

public string
# getPackageHandle( )

Gets the package requested by the current request

public
# setRequestTask( string $task )

Sets the controller task, used when the Page object identifies the actual path.

public
# setCurrentPage( Page $page )

Set the current page

public Page
# getCurrentPage( )

Get the current page object

public
# setRequestTaskParameters( string $params )

Sets the controller params, used when the Page object identifies the actual path.

public
# setCollectionPath( string $path )

Sets the request path, used when the Page object identifies the actual path.