Download the PHP package saturn/hyperion without Composer
On this page you can find all versions of the php package saturn/hyperion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saturn/hyperion
More information about saturn/hyperion
Files in saturn/hyperion
Package hyperion
Short Description Lightweight MVC framework
License GPL-2.0
Homepage https://github.com/pkrll/Hyperion
Informations about the package hyperion
Hyperion

Hyperion is the lightweight MVC framework that puts the FUN back in progrFUNamming! Or, you know, whatever. Hyperion makes it super-easy to create MVC applications.
BONUS FEATURE: No sibling incest (which can't be said about the greek deity that stole our name).
Requirements
- PHP >= 5.3.
- Apache web server, with support for mod_rewrite.
- MySQL database (optional).
Installation
Add a .htaccess file to your root directory and create your rewrite rules. The requests should be redirected to the file index.php inside the public
directory, for example:
Using Composer (recommended)
Hyperion is designed as a Composer library package. So the by far easiest, but maybe not cleanest, way to install Hyperion is by using Composer. This will add the framework to the vendor
directory, which will hide away the not-so-ugly but boring-shitty core files and help you focus on creating your SUPER HAPPY AWESOME FUN (henceforth, SHAF) application without any incestuous gods being all up in your file-structure-business. Just run the following command in the root directory of your project.
Source code
Of course, you can also download the source files or clone the git repository and manually add it to folder of your choice. It is recommended that you put in a separate folder at the root level, for example hyperion
.
Setup
-
Hyperion depends on the below outlined folder structure. So recreate this structure:
- If you want to use a database in your project, set the database specific constants in the file
config.php
in the Hyperion folder to values appropriate to your configuration. - Next, you need to include the files. Depending on the installation method, this step will differ.
Using Composer
- If installed with Composer, the folder
vendor
should have been added to the root directory. The framework is inside that folder. Use Composer's autoload method to import the files, by adding the following to the top of your index.php in the folderpublic
:
Manual installation
- If installed manually, you need to include the Hyperion files (except for config.php). Below follows an example:
Bootstrapping
- Before you can start using Hyperion to create your WORLD SHATTERING SHAF (WSSHAF for short (see above for definition of SHAF)) application, you need to call the Bootstrap class. Add the following code at the end of
index.php
.
Usage
All controllers must be placed inside the folder application/controllers
. The controllers must also abide to a specific naming convention, where the file and class name must start with a capital letter and end with Controller. Let's say we want to create a controller called SHAF. The file would then be called SHAFController.php
, while class is named SHAFController
. The controller classes must also extend the base controller, Controller
.
- Note: All controllers must have the default main-method, which will be called if the URL request does not specify any action (i.e. hyperion.dev/example). Method foo() is an example of when the URL request path is set and a parameter is passed along (i.e. hyperion.dev/example/foo/bar).
ExampleController.php
Models follow the same naming convention as do Controllers and View classes.
ExampleModel.php
example/main.tpl
Database support
Want to use a database? You got it. Wouldn't be SHAF apping otherwise. Hyperion comes with a simple Database class (using PDO), which supports MySQL. To make it super-easy and EXTREMELY WSSHAF (let's call it EWSSHAF) for you, the base model, that all your model classes extend, comes with a bunch of method for accessing simple and basic PDO commands. Below follows a list of methods you can use when creating your EWSSHAF app.
Confused? Me too. But hey, let's see an example on how to use this to make CUTE EWSSHAF (Yup, you guessed it, CEWSSHAF! Okay, I need to stop...) applications.
What is a DELICIOUS CEWSSHAF (Oh you know it, DCEWSSHAF. Seriously, I can't stop, I have serious mental issues, help me...) application without statements with -- PARAMETERS?!
Author
- Hyperion was birthed by Ardalan Samimi.