Download the PHP package footup/framework without Composer
On this page you can find all versions of the php package footup/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download footup/framework
More information about footup/framework
Files in footup/framework
Package framework
Short Description FootUp MVC Framework: A Rich Featured LightWeight PHP MVC Framework
License BSD-3-Clause
Informations about the package framework
Footup MVC PHP Framework
FOOTUP MVC FRAMEWORK - 0.1.7-alpha.9
A Rich Featured LightWeight PHP MVC Framework :
- CLI support for generating Controller, Model, Middle, Migration, Seeder, Assets and View files ( adhocore/php-cli modified and used thanks :) )
- Translation support
- Config using PHP File or .env (Rename env to .env)
- Request
- Response
- Validator (Form Validation - Not validating UploadedFile) Thanks to pdscopes/php-form-validator
- Pagination (Pagination and Pagination View) Thanks to iranianpep/paginator
- Session
- Email (CodeIgniter 4 Email Class)
- Routing
- Controller AND Middleware (But here we call it just Middle and are specific)
- Model RelationShips ($hasOne, $hasMany, $belongsTo, $belongsToMany)
- Model QueryBuilder
- Model Events CallBacks
- Files (Upload File)
- Extensible (You can integrate any library you want and you can add (news folders and class) in the App Directory using psr4 autoloading mecanism)
ReadMe should be updated -- (Soon i'll create the docs website for FootUp PHP MVC Framework)
Directories tree
Description
FOOTUP MVC Framework focus primarily to speed and minimalistic. It's 250 Kb zip, 148 kb xz. It render withing 0.001 seconds (I used a PHP 8.0.7 environment to write and test it).
My goal is doing a thing that i'm the first person that use it with ease. I added some features that help me working faster on my all day's work.
Requirements
Yo ! You can download this directly and use it without no need to external dependancy. It support composer libraries but i have not published footup yet to packagist.
So you need:
- PDO extension
- mb_string
- intl
- json
WalkThrough
CLI
For now I added just generators commands
To show help:
To generate controller:
Don't be so shy, try yourself
Request
The request and the router class are the BMW Motors They hold many thing helpful. Here how we use the request:
You are in the controller ? use like this :
But Yes, with the request you can validate data via validator like this :
Don't be so shy, explore the request class, your editor will autocomplete
The Response object is available in the controller :
The Session
This is a shared class so the data withing it remain the same, here is the example :
Validator :
If you validate data with validator, the validate function return TRUE if all passed and FALSE otherwise
I will write documentation if if if .... LOL -- If you can do it, help me !
I think i don't like writing LOL
Using the Model
Globals Functions | Fonctions glabales
request($index = null, $arg = null)
calledController($withNamespace = true)
calledMethod()
And many mores others globals functions
Uploading file | Téleverser un fichier
Getting Auto Genereted Form | Avoir un formulaire auto généré
QueryBuilder Methods | Méthode de Model QueryBuilder
# model->from($table, $reset = true): $this
Utilise $reset = false si vous ne souhaiter pas recommencer une requête. Utilise $table pour changer de table (cette méthode vous l'utiliserez rarement)
# model->join($table, $fields, $type = 'INNER', $operator = '='): $this
- $type doit être un dans ['INNER', 'LEFT OUTER', 'RIGHT OUTER', 'FULL OUTER']
- $fields string|array ex: "user.id = article.id_user" | ["user.id" => "article.id_user"]
# model->leftJoin($table, $fields, $operator = '='): $this
- $fields string|array ex: "user.id = article.id_user" | ["user.id" => "article.id_user"]
# model->rightJoin($table, $fields, $operator = '='): $this
- $fields string|array ex: "user.id = article.id_user" | ["user.id" => "article.id_user"]
# model->where($key, $val = null, $operator = null, $link = ' AND ', $escape = true): $this
- $key string|array ex: "id = 1" | ["id" => 1]
- $link string where $link is AND | OR | IS
- $fields string|array ex: "arnauld" | [2, 3, 5] for $operator IN | NOT IN
# model->whereOr($key, $val = null, $operator = null, $link = ' AND ', $escape = true): $this
# model->whereIn($key, array $val, $escape = true) | whereOrIn($key, array $val, $escape = true): $this
# model->whereRaw($str) | whereOrRaw($str): $this
# model->whereNotIn($key, array $val, $escape = true) | whereOrNotIn($key, array $val, $escape = true): $this
# model->whereNotNull($key) | whereOrNotNull($key): $this
# model->whereNull($key) | whereOrNull($key): $this
# model->asc($field): $this
# model->desc($field): $this
# model->orderBy($field, $direction = 'ASC'): $this
# model->insert($data): bool
# model->update($data): bool
Cette méthode doit être utilisée après une clause where
# model->delete($where): bool
_# model->sql($rawsql): $this
Si $raw_sql est null, la méthode retourne une chaine de caractères, retourne $this sinon.
_# model->save($objet = null, $dbfields = null): bool
- $object: the object to get data on default: $this
- _$dbarray: database fields ex: ['email', 'username']
# model->remove($objet = null): bool
- $object: the object to get primaryKey data on default: $this
NOTE: Si tu as déjà utilisé un framework comme CodeIgniter 4 tu maitriseras vite Autres méthodes groupBy, having, limit, offset, distinct, between, select, last, find, min, count, max, avg, one, first et des méthodes dynamiques comme firstBy{Field}, lastBy{Field}, findBy{Field} où {Field} est un attribut de la table.
Exemple de création de Controller
Credits Libraries
Paginator iranianpep/paginator
Form Validator pdscopes/php-form-validator
PHP Arrays pdscopes/php-arrays
PHP CLI by Adhocore adhocore/php-cli
License
BSD 3-Clause License
Copyright (c) 2021, Faustfizz [email protected] All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
All versions of framework with dependencies
ext-pdo Version *
ext-intl Version *
ext-json Version *
ext-mbstring Version *