Download the PHP package cardinalby/content-disposition without Composer

On this page you can find all versions of the php package cardinalby/content-disposition. 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 content-disposition

Test Suite Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

PHP class for handling (parsing and formatting) a value of HTTP Content-Disposition header.

Requires PHP 5.6 or newer.

Installation

Content-Disposition header

The text value of the header is in ISO-8859-1 charset. The header contains:

API

🔻 static create(...)

🔸 $fileName

File name, can contain Unicode symbols. Depending on the symbols present in the string, value will be placed to filename or filename* param.

Pass null to omit filename param.

🔸 $fallback

If the $filename argument is outside ISO-8859-1, then the file name is actually stored in a supplemental filename* field for clients that support Unicode file names and a ISO-8859-1 version of the file name is automatically generated.

This specifies the ISO-8859-1 file name to override the automatic generation or disables the generation at all.

🔸 $type

Specifies the disposition type, defaults to "attachment". This can also be "inline", or any other value (all values except inline are treated like attachment, but can convey additional information if both parties agree to it). The type is normalized to lower-case.

🔻 static createAttachment(...)

A shortcut for ContentDisposition::create($filename, $fallback, 'attachment');

🔻 static createInline(...)

A shortcut for ContentDisposition::create($filename, $fallback, 'inline');

🔻 format()

Generates the header string value (without header name).

🔻 formatHeaderLine()

Generates the full header line: Content-Disposition: ..., where ... equals format() result.

🔻 static parse()

Parses a Content-Disposition header string and returns ContentDisposition object.

🔻 getType()

Returns the download type

🔻 getFilename()

Returns a value of filename* param or (if doesn't exist) a value of filename param or null (if none exists).

🔻 getParameters()

Get associative array of all parameters including filename and filename*.

🔻 getCustomParameters()

Get associative array of unknown parameters (except filename and filename*).

References

Reference implementation: content-disposition library for NodeJS.

License

MIT


All versions of content-disposition with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
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 cardinalby/content-disposition contains the following files

Loading the files please wait ....