BlackholeFrame is an ultracondensed PHP framework designed for fast development of dynamic websites using a loop-based templating system.
To start using the only pre setup you need is a server running on your computer aka: Xampp or similar. (of course, php, mysql and that stuff is required, but it is usually already on server defaults)
Browse to http://bit.ly/blackholefw. There you will find a screen with instructions for installation.
Enter the name of your project, just lowercase letters and numbers, without spaces. This will be used for many things, including your project folder name.
Right click and save the file bigbang.php in the root folder of your project (the folder must have the same name you provided above).
Click the indication to start. All files will be downloaded to your project folder and you can start customizing your project.
That’s it.
- Minimal structure
- Automatic database rendering
- <loop> driven templates
- Inline SQL configuration
- Function filters inside templates
- Zero dependencies
The philosophy is simple: HTML first, PHP invisible.
- Automatic routing by folder name
- Database rendering via <loop>
- Inline SQL using <sql>
- Field placeholders {column}
- Function filters {function->slug->title}
- PDO MySQL backend
- Extremely small core
- Built-in Bootstrap
- Built-in Fontawesome
- Built-in jQuery library
- Built-in CKEditor
/
│ index.php
| .htaccess
│ README.md
| void.php (only for install)
| singularity.php (only for install)
│ bigbang.php (only for install)
│
└── app/
|
├── config/
│ config.php
│ database.php
│ directories.php
|
├── model/
│ AppModel.php
│ AdminModel.php
|
├── vendors/
│ composer/
| etc.
│
─── view/
|
--- elements/
|
|── site/
| banners.php
| footer.php
| gallery.php
| head.php
| menu-mobile.php
| menu.php
| top.php
|
|── helper/
| form.php
| list.php
|
|
|── pages/
|
|── home/
| index.php
|
|── items/
| index.php
| item.php
|
|
|─── webroot/
|
| index.php
| admin.php
| login.php
| logout.php
|
|── css/
| style.css
|
|── files/
| logo.svg
| etc.
|
|── img/
|
|── banners/
| banner-01.webp
| etc.
|
|── items/
| item-01.webp
| etc.
|
|── js/
| etc.
- Make sure you have PHP 7+, MySQL, Apache.
- Access the void.php to start the cloning.
- Follow the steps
- Visit http://localhost{:port}/yourproject
http://localhost/yourproject/items → http://localhost/yourproject/app/view/pages/items/index.php
<loop>
<h1>{title}</h1>
<p>{description}</p>
</loop>
<loop>
<sql>
table=items;
where=category=2;
orderby=id;
order=DESC;
limit=3;
</sql>
<h2>
{title}
</h2>
</loop>
You fetch the data from the database by simply telling the column you want within braces. eg.:
{title}
{description}
{id}
{function->slug->title}
{function->uppercase->title}
{function->limit_chars_200->description}
- Scan loops
- Extract columns
- Clean SQL
- Query PDO
- Apply PHP functions
- Replace placeholders
Author: Éctor Rodrigues
License: MIT