Download the PHP
package zutto/pandora-mvc without Composer
On this page you can find all versions of the php package
zutto/pandora-mvc. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor zutto Package pandora-mvc Short Description Lightweight MVC License
MIT
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.
The goal: to create a lightweight framework that allows web entities to be rendered and served back to an HTTP client.
The result: Pandora, a small package that simplifies creation of dynamic web pages by assuming things about where your site's assets live.
Set-up
Take a composer dependency on pandora-mvc:
Configure
Provide Pandora with the runtime configuration it needs in your index.php:
The 3 parts:
A classloader for your controllers (and models)
A path to your JSON configuration directives that will provide runtime config
A call to FrontController::render
Serve
Your controllers will simply be generic classes where each method is mapped to a page.
When a page is requested, the lifecycle looks like this:
The appropriate controller is loaded according to the autoloader you've configured
An instance of it is created and injected with a Request and Model objects
An appropriate view is loaded according to the Accept-Type of the request
The page method is called and its return value is exposed to the view
Viola!
Example
Here's an example of a controller for an operation that gives a formatted date:
If you've set up a configuration like the one in the section above, TimeController::format() will be called whenever someone sends a request to:
index.php?page=time&action=format
By accessing that URL, Pandora will execute the format method and try to load a view file in views/time/method.html.php--or method.json.php if the request specified application/json as the Accept-type.
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 zutto/pandora-mvc contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.