SlideShare a Scribd company logo
Flyr – PHP micro framework
There are a lot of frameworks, each one with their particularities. There are really good
frameworks like laravel, codeigniter, cakephp, etc.
Flyr wants to be easy, simple and extensible. The goal is develop a fast micro-framework
which be so fast as user needs to develop applications.
Why try to remake validators, uploaders, orms and more software pieces if you can find
them in github with great quality and well tested?
Then you can add those libraries with a package manager like composer in your flyr
project.
Why another framework?
Flyr comes with a set of utilities:
- Router system with support for GET, POST, PUT and DELETE methods.
- Simple log component with email and file support.
- Http header manipulation.
- Cookies encryption.
- Simple cookie and session api.
- Easy multi-language component.
- Twig and php templates.
- Simple application skeleton for organize your project.
- Little mail sender support with PHPMailer.
What contains Flyr?
Installing flyr is as simple as creating a composer project or downloading the zip file inside
the flyr github REPOSITORY that contains all packages needed to run your application.
Run the following command to start a new project(at the current moment):
> composer create-project “flyr/flyr”:“1.0.*@dev”
Or simply download Flyr.zip in https://github.com/SiroDiaz/Flyr.
Now you have installed a copy of Flyr framework and you are ready to start developing.
How to install Flyr?
You can design a REST API easily using four request methods: GET, POST, PUT and DELETE.
Also, each route can contain parameters.
Finally you can pass a callback(anonym function) or the controller and method name. This
last option would be better for organize your project.
To resume this part you will see a few lines of code to understand better all refered to
routes.
Routes
Routes example
• Flyr also provides support for simple PHP templates (with tags <?php ?>) and Twig
template engine.
• You can render templates with the render method.
• But not only one template can be rendered for show in the browser, also you are able
to render multiple php or twig templates calling multiple times render method.
All templates are saved inside the folder app/views/ and all Twig templates are
automatically cached.
Views
Views example
For developing the REST of APIs you will need to return in your response body a data type
like JSON or XML and must be defined the response encoding as application/json or
text/xml for each data type.
You can set all response headers using the header->set method.
Maybe you need to remove headers like X-powered-by , redirect or send a response code.
It is simple and you can see the following examples using header object.
HTTP headers
HTTP headers example
Session and cookies have a new API for make many actions in the correct way like
deleting sessions and cookies, encrypting cookies or prevent cookie access from the
browser.
In the PHP cofiguration file (Flyr/Config/php_config.php) cookies and sessions are
correctly cofigured for avoid main source of session hijack.
Cookies methods are: create, delete, deleteAll, set, get.
Session methods are: start, set, get, delete, deleteAll.
You can see the following examples:
Managing sessions and cookies
Cookies and sessions example
Session example
Cookie example
Other important object is the flyr loader. You can load helpers and language files. Helpers
are files containing functions or classes to solve a specific group of problems. For example,
you can create a file called string_helper.php that has some functions to manipulate strings.
In the following example you can see how to load a language file containing the seven days
in Spanish:
Loader
Loading a language file example
A language file with an
associative array style
Loading the language file named ‘days.php’
inside the language folder ‘es’
Thanks
To know more about Flyr micro-
framework and read the full
documentation visit
https://github.com/SiroDiaz/Flyr
Fork and star the project

More Related Content

PPTX
PHP Presentation
PPTX
Codeigniter
PPT
Installation of wordpress
PPTX
Php intro
PPT
PDF
Lean Php Presentation
PPT
Php hypertext pre-processor
PHP Presentation
Codeigniter
Installation of wordpress
Php intro
Lean Php Presentation
Php hypertext pre-processor

What's hot (20)

PPTX
Intro to flask
PPTX
Virtualenv
PPT
Apache
PPTX
php basics
PPTX
Php technical presentation
PPTX
PHP programmimg
PPT
Ruby Projects and Libraries
PPTX
Windows PowerShell - Billings .NET User Group - August 2009
PDF
CakePHP
PPTX
Postman Collection Format v2.0 (pre-draft)
PPT
Php Ppt
PDF
Laravel 6 and its features
PPT
Logging Services for .net - log4net
PPTX
Phalcon 2 - PHP Brazil Conference
PPTX
Javascript And CSS Libraries
PPTX
PHP Conference - Phalcon hands-on
PDF
PPTX
40+ tips to use Postman more efficiently
PPT
Os Bubna
PPT
MySQL Presentation
Intro to flask
Virtualenv
Apache
php basics
Php technical presentation
PHP programmimg
Ruby Projects and Libraries
Windows PowerShell - Billings .NET User Group - August 2009
CakePHP
Postman Collection Format v2.0 (pre-draft)
Php Ppt
Laravel 6 and its features
Logging Services for .net - log4net
Phalcon 2 - PHP Brazil Conference
Javascript And CSS Libraries
PHP Conference - Phalcon hands-on
40+ tips to use Postman more efficiently
Os Bubna
MySQL Presentation
Ad

Viewers also liked (20)

DOCX
Proyecto educativo lectura y tic
PPTX
Presentacion croquis
PDF
Fluid - Templating for professionals - T3CON09
PPT
Avatar Minihompy Proposal
PPT
Liceo Pedagógico Maria Reina de la Paz
PPTX
Fortum in India
PPTX
Red Logica
PPTX
Kotler pom 15e_inppt_09
PDF
Lineamientos para el uso y aplicacion de los recursos educativos digitales
PDF
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
PPTX
2013 july gac webinar for tom
PDF
PDF
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
PDF
Pelan Hebat Produk Hebat e-naco
PPTX
Modelos de investigación cualitativa y cuantitativa
PDF
96084535 informe-final-serums
PDF
Gymkana los derechos del niño
PPTX
Funciones mentales superiores 4 to trimestre psicologia
 
PDF
Bob Dylan on Creativity
Proyecto educativo lectura y tic
Presentacion croquis
Fluid - Templating for professionals - T3CON09
Avatar Minihompy Proposal
Liceo Pedagógico Maria Reina de la Paz
Fortum in India
Red Logica
Kotler pom 15e_inppt_09
Lineamientos para el uso y aplicacion de los recursos educativos digitales
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
2013 july gac webinar for tom
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
Pelan Hebat Produk Hebat e-naco
Modelos de investigación cualitativa y cuantitativa
96084535 informe-final-serums
Gymkana los derechos del niño
Funciones mentales superiores 4 to trimestre psicologia
 
Bob Dylan on Creativity
Ad

Similar to Flyr PHP micro-framework (20)

PDF
Web Services PHP Tutorial
PDF
Web Services Tutorial
PDF
Web services tutorial
PPTX
Introduction to Monsoon PHP framework
PDF
Don't screw it up! How to build durable API
KEY
Future of PHP
PDF
Introducing symfony
PDF
Design Web Service API by HungerStation
PDF
REST easy with API Platform
PDF
Using an API
PDF
Don't screw it up: how to build durable web apis
PDF
Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA)
PDF
Symfony book 2.1
PPTX
PPTX
Lecture 2_ Intro to laravel.pptx
PDF
Building APIs in an easy way using API Platform
PPTX
Introduction to Laravel Framework (5.2)
ODP
NEPHP '13: Pragmatic API Development
PDF
Taking Care of The REST - Creating your own RESTful API Server using Restler 2.0
PDF
PHP And Web Services: Perfect Partners
Web Services PHP Tutorial
Web Services Tutorial
Web services tutorial
Introduction to Monsoon PHP framework
Don't screw it up! How to build durable API
Future of PHP
Introducing symfony
Design Web Service API by HungerStation
REST easy with API Platform
Using an API
Don't screw it up: how to build durable web apis
Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA)
Symfony book 2.1
Lecture 2_ Intro to laravel.pptx
Building APIs in an easy way using API Platform
Introduction to Laravel Framework (5.2)
NEPHP '13: Pragmatic API Development
Taking Care of The REST - Creating your own RESTful API Server using Restler 2.0
PHP And Web Services: Perfect Partners

Recently uploaded (20)

PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administraation Chapter 3
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Introduction to Artificial Intelligence
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Transform Your Business with a Software ERP System
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
top salesforce developer skills in 2025.pdf
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Digital Strategies for Manufacturing Companies
PDF
medical staffing services at VALiNTRY
PDF
System and Network Administration Chapter 2
ai tools demonstartion for schools and inter college
System and Network Administraation Chapter 3
How to Migrate SBCGlobal Email to Yahoo Easily
Operating system designcfffgfgggggggvggggggggg
Introduction to Artificial Intelligence
wealthsignaloriginal-com-DS-text-... (1).pdf
Reimagine Home Health with the Power of Agentic AI​
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Navsoft: AI-Powered Business Solutions & Custom Software Development
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Transform Your Business with a Software ERP System
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
top salesforce developer skills in 2025.pdf
Digital Systems & Binary Numbers (comprehensive )
Digital Strategies for Manufacturing Companies
medical staffing services at VALiNTRY
System and Network Administration Chapter 2

Flyr PHP micro-framework

  • 1. Flyr – PHP micro framework
  • 2. There are a lot of frameworks, each one with their particularities. There are really good frameworks like laravel, codeigniter, cakephp, etc. Flyr wants to be easy, simple and extensible. The goal is develop a fast micro-framework which be so fast as user needs to develop applications. Why try to remake validators, uploaders, orms and more software pieces if you can find them in github with great quality and well tested? Then you can add those libraries with a package manager like composer in your flyr project. Why another framework?
  • 3. Flyr comes with a set of utilities: - Router system with support for GET, POST, PUT and DELETE methods. - Simple log component with email and file support. - Http header manipulation. - Cookies encryption. - Simple cookie and session api. - Easy multi-language component. - Twig and php templates. - Simple application skeleton for organize your project. - Little mail sender support with PHPMailer. What contains Flyr?
  • 4. Installing flyr is as simple as creating a composer project or downloading the zip file inside the flyr github REPOSITORY that contains all packages needed to run your application. Run the following command to start a new project(at the current moment): > composer create-project “flyr/flyr”:“1.0.*@dev” Or simply download Flyr.zip in https://github.com/SiroDiaz/Flyr. Now you have installed a copy of Flyr framework and you are ready to start developing. How to install Flyr?
  • 5. You can design a REST API easily using four request methods: GET, POST, PUT and DELETE. Also, each route can contain parameters. Finally you can pass a callback(anonym function) or the controller and method name. This last option would be better for organize your project. To resume this part you will see a few lines of code to understand better all refered to routes. Routes
  • 7. • Flyr also provides support for simple PHP templates (with tags <?php ?>) and Twig template engine. • You can render templates with the render method. • But not only one template can be rendered for show in the browser, also you are able to render multiple php or twig templates calling multiple times render method. All templates are saved inside the folder app/views/ and all Twig templates are automatically cached. Views
  • 9. For developing the REST of APIs you will need to return in your response body a data type like JSON or XML and must be defined the response encoding as application/json or text/xml for each data type. You can set all response headers using the header->set method. Maybe you need to remove headers like X-powered-by , redirect or send a response code. It is simple and you can see the following examples using header object. HTTP headers
  • 11. Session and cookies have a new API for make many actions in the correct way like deleting sessions and cookies, encrypting cookies or prevent cookie access from the browser. In the PHP cofiguration file (Flyr/Config/php_config.php) cookies and sessions are correctly cofigured for avoid main source of session hijack. Cookies methods are: create, delete, deleteAll, set, get. Session methods are: start, set, get, delete, deleteAll. You can see the following examples: Managing sessions and cookies
  • 12. Cookies and sessions example Session example Cookie example
  • 13. Other important object is the flyr loader. You can load helpers and language files. Helpers are files containing functions or classes to solve a specific group of problems. For example, you can create a file called string_helper.php that has some functions to manipulate strings. In the following example you can see how to load a language file containing the seven days in Spanish: Loader
  • 14. Loading a language file example A language file with an associative array style Loading the language file named ‘days.php’ inside the language folder ‘es’
  • 15. Thanks To know more about Flyr micro- framework and read the full documentation visit https://github.com/SiroDiaz/Flyr Fork and star the project