0% found this document useful (0 votes)
13 views

Learning FuelPHP for Effective PHP Development 1st Edition Ross Tweedie pdf download

The document is a promotional overview of the book 'Learning FuelPHP for Effective PHP Development' by Ross Tweedie, which covers the FuelPHP framework for PHP development. It includes links to download the book and other related resources, as well as a detailed table of contents outlining the chapters and topics covered in the book. Additionally, it provides information about the author, reviewers, and support resources available through Packt Publishing.

Uploaded by

stonysseese
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Learning FuelPHP for Effective PHP Development 1st Edition Ross Tweedie pdf download

The document is a promotional overview of the book 'Learning FuelPHP for Effective PHP Development' by Ross Tweedie, which covers the FuelPHP framework for PHP development. It includes links to download the book and other related resources, as well as a detailed table of contents outlining the chapters and topics covered in the book. Additionally, it provides information about the author, reviewers, and support resources available through Packt Publishing.

Uploaded by

stonysseese
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Learning FuelPHP for Effective PHP Development

1st Edition Ross Tweedie pdf download

https://ebookmeta.com/product/learning-fuelphp-for-effective-php-
development-1st-edition-ross-tweedie/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

PHP 8 Basics: For Programming and Web Development 1st


Edition Gunnard Engebreth

https://ebookmeta.com/product/php-8-basics-for-programming-and-
web-development-1st-edition-gunnard-engebreth/

Learning Drupal 6 Module Development A practical


tutorial for creating your first Drupal 6 modules with
PHP 1st Edition Butcher Matt

https://ebookmeta.com/product/learning-drupal-6-module-
development-a-practical-tutorial-for-creating-your-first-
drupal-6-modules-with-php-1st-edition-butcher-matt/

Learning PHP, MySQL & JavaScript, 7th Edition Robin


Nixon

https://ebookmeta.com/product/learning-php-mysql-javascript-7th-
edition-robin-nixon/

Harmony of Colour 09 Beauty and the Beast 1st Edition


Nuclear Media

https://ebookmeta.com/product/harmony-of-colour-09-beauty-and-
the-beast-1st-edition-nuclear-media/
Constitutional Development in the Commonwealth
Caribbean 1st Edition Hamid A. Ghany

https://ebookmeta.com/product/constitutional-development-in-the-
commonwealth-caribbean-1st-edition-hamid-a-ghany/

Russian How to Get Really Good at Russian Learn Russian


to Fluency and Beyond 1st Edition Polyglot Language
Learning

https://ebookmeta.com/product/russian-how-to-get-really-good-at-
russian-learn-russian-to-fluency-and-beyond-1st-edition-polyglot-
language-learning/

Finite Element Analysis and Design of Steel and Steel


Concrete Composite Bridges Ehab Ellobody

https://ebookmeta.com/product/finite-element-analysis-and-design-
of-steel-and-steel-concrete-composite-bridges-ehab-ellobody/

American Farmhouse Style October 2022 5th Edition


American Farmhouse Style

https://ebookmeta.com/product/american-farmhouse-style-
october-2022-5th-edition-american-farmhouse-style/

Research Methods and Evidence Based Practice 4th


Edition Pranee Liamputtong

https://ebookmeta.com/product/research-methods-and-evidence-
based-practice-4th-edition-pranee-liamputtong/
Biomedical Imaging Instrumentation: Applications in
Tissue, Cellular and Molecular Diagnostics (Volume 2)
(Primers in Biomedical Imaging Devices and Systems,
Volume 2) 1st Edition
https://ebookmeta.com/product/biomedical-imaging-instrumentation-
applications-in-tissue-cellular-and-molecular-diagnostics-
volume-2-primers-in-biomedical-imaging-devices-and-systems-
volume-2-1st-edition/
Table of Contents
Learning FuelPHP for Effective PHP Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. What is FuelPHP?
A brief history of FuelPHP
Features of FuelPHP
(H)MVC
Modular and extendable
Security
Oil – the power of the command line
ORM
Base controller classes and model classes
The authentication package
Template parsers
Documentation
What to look forward to in Version 2.0
Global scope and moving to dependency injection
Singleton
Multiton
Dependency injection container
Coding standards
Package management and modularization
Backwards compatibility
Speed boosts
Summary
2. Installation
Preparing the development environment
Apache
PHP
Database interactions
Source control – introducing Git
Further information about Git
Getting and installing FuelPHP with curl and Oil
Clone from GitHub
Continuing the installation
Setting up your project
Using submodules to easily update the FuelPHP core and
packages
Committing your code
Composer – the package manager
Configuration
Running in the production environment
Performing migrations
Summary
3. The Architecture
Environments, constants, and configuration
Server and Apache configuration
The bootstrap PHP file
Configuration
Constants
Models, views, and controllers
Views and ViewModels
Models
Controllers
Template
Rest
Hybrid
Summary
4. Demo Application
Getting started
Creating a database table
Entries
Categories
Users
categories_entries
Migrations and Oil
Models
Controllers
Views
Generating an administration system using Oil
Summary
5. Packages
What is a package?
Recommended packages
OAuth
OAuth2
Mandrill
Sprockets
Using the Auth package for user authentication
SimpleAuth
ORMAuth
OPAuth
Composer
An introduction to building your own package
Setting up a repository
Working the package as a submodule
Structuring your package
Configuring your package
Using your package
Letting people know about your package
Summary
6. Advanced Topics
What modules are and how to use them
Namespaces
The module folder structure
Using the module from the main application
Tasks
Routing
Unit testing
So what is unit testing?
PHPUnit
Running unit tests
Creating unit tests
Grouping unit tests
Configuration and module testing
Profiling
Summary
7. Welcome to the Community
FuelPHP and GitHub
Getting help and support
FuelPHP on social media
Twitter
Facebook
Parting words
Index
Learning FuelPHP for
Effective PHP Development
Learning FuelPHP for
Effective PHP Development
Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored


in a retrieval system, or transmitted in any form or by any means,
without the prior written permission of the publisher, except in the
case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure
the accuracy of the information presented. However, the information
contained in this book is sold without warranty, either express or
implied. Neither the author, nor Packt Publishing, and its dealers and
distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information


about all of the companies and products mentioned in this book by
the appropriate use of capitals. However, Packt Publishing cannot
guarantee the accuracy of this information.

First published: November 2013

Production Reference: 1141113

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK..

ISBN 978-1-78216-036-6
www.packtpub.com

Cover Image by Suresh Mogre (<suresh.mogre.99@gmail.com>)


Credits
Author

Ross Tweedie

Reviewers

Adam Booth

Rémi Delhaye

Derrick Egersdorfer

Acquisition Editor

Kartikey Pandey

Kevin Colaco

Commissioning Editor

Shaon Basu

Technical Editor

Akashdeep Kundu

Copy Editors

Alisha Aranha

Roshni Banerjee

Tanvi Gaitonde

Sayanee Mukherjee
Project Coordinator

Amey Sawant

Proofreader

Linda Morris

Indexer

Hemangini Bari

Tejal Soni

Production Coordinator

Kirtee Shingan

Cover Work

Kirtee Shingan
About the Author
Ross Tweedie is a developer who specializes in creating
applications using PHP and FuelPHP. He is passionate about using
FuelPHP to test new ideas and concepts effectively. He is using open
source technologies to enable people to collaborate with one
another. His background is both in design and development, and he
has experience in a wide range of industries.

I would like to thank my family for putting up with the writing


sessions. I would also like to thank Stuart Cullum and Davide
Casali for their encouragement for this book. I would also like to
thank Maarten Jacobs for some of the great tools created and
used during this book.

I would also like to thank the team at Packt Publishing including


Amey Sawant, Shaon Basu, and Yogesh Dalvi for their help with
this book.
About the Reviewers
Adam Booth is a devoted web developer living in Oklahoma City.
He loves all kinds of technology and prefers to stay on the cutting
edge of tech news. In his spare time he enjoys watching movies and
working on side projects to learn new frameworks and languages.
One of these side projects was to create a home automation system
that included a beautiful dashboard used to deliver useful
information such as weather forecasts for the week, movies playing
in theaters, shopping lists, and calendar events happening in the
future.

Adam has been using PHP for many years and FuelPHP has been his
framework of choice for all new PHP projects he starts. He is excited
about the future of web technologies and believes this is where the
future of development will really thrive.

I would like to thank my wife, Mallory, for all of the support she
has given me over the years. She is creative, resourceful, and
one of the best debuggers I know. I'd also like to thank my
parents, Don and Susan, who have always been inspirational and
encouraging. As small business owners, they have shown me
how hard work and perseverance pays off.

I hope you enjoy reading this book as much as I did. FuelPHP is


a great framework with a community full of developers willing to
help. The team members for FuelPHP are great at what they do
and somehow still find the time to answer questions in the
forums and other websites.

Rémi Delhaye is a 19-year-old French IT student. His hobbies are


Football (U.S.), Muay Thaï, Music, and Computer Science. He is
passionate about mobile and web development, and his career
objective is to create his own international IT business.

He is also passionate about web development and loves working on


fantastic projects!

As an IT Student, he worked in one web agency (Calais, France) as


an Intern Web Developer and in another Incubation firm (start-up)
as a Junior Web Developer (Symfony2) and Frontend Developer
(Miami, FL).

He did his schooling from EPSI (Master Degree of IT Engineering).


You can contact him at:

GitHub: http://github.io/RemiDelhaye
Website: http://remidelhaye.fr

Derrick Egersdorfer is a 34-year-old web developer, living in


Durban, South Africa. He has over 9 years of experience of using
PHP, MySQL, and various JavaScript frameworks. In 2010, Derrick
partnered with two of his colleagues to form a web and graphic
design studio. Since then, Derrick has been specializing in highly
customized website solutions, such as Social Media Networks and
Geographic Information Systems.
www.PacktPub.com
Support files, eBooks,
discount offers and more
You might want to visit www.PacktPub.com for support files and
downloads related to your book.

Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.PacktPub.com and as a print book customer,
you are entitled to a discount on the eBook copy. Get in touch with
us at <service@packtpub.com> for more details.

At www.PacktPub.com, you can also read a collection of free


technical articles, sign up for a range of free newsletters and receive
exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is


Packt's online digital book library. Here, you can access, read and
search across Packt's entire library of books.
Discovering Diverse Content Through
Random Scribd Documents
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back

You might also like