Download the PHP package parable-php/framework without Composer

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

Parable PHP Framework

Workflow Status Latest Stable Version Latest Unstable Version License

Parable is a PHP framework with two goals: it's just enough, and it doesn't enforce a way to build.

Install

Php 8.0+ and composer are required.

And to set up parable, run the following and follow the interactive questions:

Usage

After installation (and you chose to install the example app) you'll have an example application to look at.

Parable 2.0 is based around plugins to arrange everything. It's not a framework that makes you do things a certain way outside of this.

If you want to set up routes? RoutesPlugin. Set up the configuration? ConfigPlugin. As long as you add these to Boot.php they'll be loaded at the appropriate time.

Application::PLUGIN_BEFORE_BOOT should contain plugins that need to be loaded before the database or sessions are loaded. ConfigPlugin, for example, should be here so you can set up the database. Application::PLUGIN_AFTER_BOOT is for plugins that require a database, for example.

Example ConfigPlugin

Anything within the config namespace parable is used by the Application class to set up specific things. You don't have to use these (this example file shows all possible values) but you can if it's faster/easier.

In the example below, yourstuff is just an example of adding your own config values to the Config instance used throughout the application. Feel free to add whatever you want here!

Example RoutingPlugin

To set up routing, just add a RoutingPlugin and place it either in PLUGIN_BEFORE_BOOT or PLUGIN_AFTER_BOOT depending on whether you need the session/database to be active first.

For full information on parable-php/routing, read the README.md of that package.

Being able to set template is something specific to Parable 2.0.0, parable-php/routing by default doesn't understand templates, so it's being passed as metadata, and the framework itself can deal with the template metadata.

The template files are expected to just be php files (but named phtml here to indicate it's a template). See welcome.phtml in the example app to see how to use it.

By setting this at the top of the file, you get access to a lot of built-in features:

See the top-most doc-block of Template.php to see what's available, but you can do anything from accessing the Di Container ($this->container) to events ($this-events).

A question I've gotten regularly is 'how do I pass data from a controller to a template/view?'.

Well, my dear friend, it's easy. In the controller:

And in the template, if you've added @var \Parable\Framework\Http\Template $this like I suggested you do? Easy!

The DataCollection from parable-php/getset is specifically intended for free-form data storing and sharing across files, so it's perfect for this.

Note that you don't need either controllers OR templates! You can also just pass an anonymous function in, which can be perfect for small and simple REST APIs:

Packages used in parable-php/framework

Check the below packages for any questions you might have about how to approach them. Their behavior is fully available to you as part of the framework and Parable 2.0 doesn't do anything special to stop you or wrap it in weird ways. Mostly what's been added only serves to do setup as part of the Config flow, none of which is required.

Thank youses

I want to thank the following people for inspiring, challenging and brainstorming with me about ideas and how to make Parable the best framework I never found anywhere else:

Contributing

Any suggestions, bug reports or general feedback is welcome. Use github issues and pull requests, or find me over at devvoh.com.

License

All Parable components are open-source software, licensed under the MIT license.


All versions of framework with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
ext-pdo Version *
ext-pcntl Version *
parable-php/console Version ^1.0
parable-php/di Version ^1.0
parable-php/event Version ^1.0
parable-php/getset Version ^1.0
parable-php/orm Version ^1.0
parable-php/routing Version ^1.0
parable-php/http Version ^1.0
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 parable-php/framework contains the following files

Loading the files please wait ....