Download the PHP package awonderphp/fileresource without Composer

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

FileResource Abstract Class

An abstract class for resources embedded in a web page (images, scripts, whatever)

This package is intended to provide a standard means by which web applications can treat resources embedded in the web page as objects.

The advantage of treating resources as objects is it allows them to have both properties and methods that can do stuff with those properties and/or parameters fed to those methods.

This package also includes an abstract class for using PHP to serve the resource described by a FileResource object.

Install Package

You can install this class with composer require awonderphp/fileresource:^1.0

Class Properties

The following properties are defined by the abstract class:

Notes About the Class Properties

For many files, additional properties are needed to adequately embed the resource within a web page (such as alt tag and possibly caption for an image)

This abstract class is intended to define most properties commonly needed for embedding a resource in a web page and everything that is needed for a PHP wrapper to correctly serve the file.

The four url* properties correspond with the the PHP function parse_url with the following ommissions:

Class Methods

The following methods are defined by the abstract class:

FileWrapper Class

This is a class that extends my \AWonderPHP\FileWrapper\FileWrapper class. The class it extends was written to be a download wrapper including support for client cache validation and partial content requests.

However that class uses the timestamp of the file on the filesystem for the Last-Modified header and uses the inode of the file on the filesystem in its generation of the ETag header.

The extended class allows the modification timestamp and the ETag to be set independent of the file on the filesystem.

ResourceServer Class

This is an abstract class that provides a public method for serving a file based from a FileResource object.

The idea is to extend the class adding a method construct the necessary FileResource object and then serve it.

GenericFileResource Class

This is a very generic class that extends the FileResource abstract class. It exists to provide for easy unit testing of the public methods in the abstract class but it can be used in web applications.

The __construct function takes a single argument, an array of key => value pairs where the key corresponds to the FileResource property you wish to set.

Unit Testing

Unit Testing is performed using PHPUnit version 7. The results can be viewed in the file UnitTestResults.txt


EOF


All versions of fileresource with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1.0 || ~7.2.0
awonderphp/filewrapper Version ^1.1
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 awonderphp/fileresource contains the following files

Loading the files please wait ....