Download the PHP package moderntribe/square1-request without Composer

On this page you can find all versions of the php package moderntribe/square1-request. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package square1-request

Request Object

Tribe Libs provides a Request helper object in order to allow easy access to common request (or server) related values, such as headers, input values, and URL/path information.

Usage

This object can be made available to your classes via direct injection in your constructor

Once injected, the Request object will automatically contain the various values relating to the current request. For instance, to access the Content-Type header, you could use:

The Request Object is also available via a Facade for usage in classes in which you don't have control over the Constructor (such as a Controller) in order to inject the class as you normally would.

Methods

query()

Get the current \WP_Query global object. Note that this always grabs the global $wp_query at the time of calling in order to provide the most-up-to-date version of the object, so it can be used just like global $wp_query can within hooks.

headers()

Get all of the headers for this request.

header( $key )

Get the header value by key.

input( $key )

Get the input from the Request by key. Automatically detects the method (GET, POST, JSON body) and returns the value from the correct method values.

all()

Get all input values from the Request. Automatically detects method and pulls in the values from there. If method is not GET and the request also has query parameters, returns both the method input and the query parameters.

only( $keys )

Return only input values matching the provided keys. Returns an array containing only those keys which existed (including empty values). Will not return values for non-existent keys.

except( $keys )

Return all input values except those matching the provided keys. Returns an empty array if no other values exist beyond the provided keys.

has( $key )

Determine whether an input matching the provided key exists in the Request. Will return true if input key exists even if it is empty.

filled( $key )

Determine whether an input matching the provided key exists and is non-empty. Will return true if value is bool or 0, but false for any empty string or null value.

path( $include_params = false )

Get the current Request path. If $include_params is set to true, also include any Query Params in the path.

url()

Get the current Request URL. Does not contain path or any Query Parameters.

full_url()

Get the full current Request URL. Includes both the path and any Query Parameters.

is( $path )

Determine if the current Request Path matches the given pattern. Wildcards (*) can be used.


All versions of square1-request with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package moderntribe/square1-request contains the following files

Loading the files please wait ....