Download the PHP package molajo/resource without Composer

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

======= Resource

Build Status

Resource provides PHP applications with a generalized approach for locating and handling file and folder resource using URI namespaces.

Basic Principles

With Resource, applications interact with filesystem resource using a URI namespace, rather than specifying file and folder names.

This approach provides two important benefits:

First, namespacing generalizes location information so that the application no longer requires hardcoded physical locations. The Resource package locates the physical location based on the URI namespace resulting in flexibility as to storage location and facility.

Second, the Resource package uses an adapter handler to process process the application request for the resource. In this sense, the treatment required for each file request can be customized based on the URI scheme. For example, the handler for PHP classes can defined as an SPL autoloader while the handler for an XML configuration file might return an XML string read from the located file. In the case of a model, one might return a Read Controller, instantiated with all dependencies injected and ready for queries. A request for an image file might return an image, resized, as needed. The possibilities are endless.

Examples of how Molajo uses Resource

Class Handler

The Resource Class Handler is defined as an SPL Autoloader. PHP passes any requests to locate a class file to this method which attempts to locate the file and includes it, if found.

XML Handler

The Resource XML Handler locates and returns the path for a specified resource

Results:

Query Handler

The Resource Query Handler locates the model XML file, processes the extend and include statements, generating the full model definition, instantiates the required Model class, injecting required dependencies, injects the Model instance and other required dependencies into the necessary Controller, and then passes the Controller instance back to the application for processing.

Other Handlers

The Resource Package, as used in Molajo, has URI Handlers for Themes, Views, JS, CSS, Files and Folders, and so on. Work on other usage types, such as Constants, Functions, and Interfaces is underway. While Resource is still a work in progress, it is an integral part of the Molajo application.

Resource Definitions

The first step is determining what resource and must be accessible to your application. Define the scheme and request structure. Typical resource applications use include: classes, configuration files, CSS, JS, images, etc. The Resource package provides Handlers for these typical use case.

All Schemes must be defined and handlers created for each scheme:

Next, all application resource should be mapped to namespace prefixes and inclusion and exclusion criteria for that namespace:

If overrides are required, define a generalized prioritization approaches for selecting which file is needed:

From that information, resource maps can be compiled for performance purposes, if desired, although 100% dynamic resource location is supported.

This process also creates compiled data used by Molajo's IoCC package for [identifying concrete class dependencies] (https://github.com/Molajo/Resource/blob/master/Files/Output/ClassDependencies.json) and for mapping concretes to interfaces.

IoCC Services for Resource

Following are examples of how Molajo instantiates the Resource class and handlers:

This is just a general description of the Resource package, feedback is welcome. Remember

it's still a work in progress and not ready for production use.


All versions of resource with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 molajo/resource contains the following files

Loading the files please wait ....