Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Yii Application Development Cookbook - Second Edition

You're reading from   Yii Application Development Cookbook - Second Edition This book is the perfect way to add the capabilities of Yii to your PHP5 development skills. Dealing with practical solutions through real-life recipes and screenshots, it enables you to write applications more efficiently.

Arrow left icon
Product type Paperback
Published in Apr 2013
Publisher Packt
ISBN-13 9781782163107
Length 408 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (20) Chapters Close

Yii Application Development Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Under the Hood 2. Router, Controller, and Views FREE CHAPTER 3. AJAX and jQuery 4. Working with Forms 5. Testing Your Application 6. Database, Active Record, and Model Tricks 7. Using Zii Components 8. Extending Yii 9. Error Handling, Debugging, and Logging 10. Security 11. Performance Tuning 12. Using External Code 13. Deployment Index

Customizing the Yii autoloader


Yii uses a naming convention and an autoloader to load only classes that are really needed and to avoid including files explicitly. As other frameworks and libraries could use a different naming convention, Yii provides an ability to customize rules of autoloading classes. In the Using Zend Framework from Yii recipe in this chapter, we used Zend_Loader_Autoloader to be able to use Zend Framework classes without including them explicitly. If we are using only Zend Framework's core classes, then its complex autoloader is a bit too much. Moreover, there are still require_once calls in each Zend Framework class, so it still loads tons of unused files. In this recipe, we will create a very simple and fast autoloader that will allow us to do the same, but faster.

Getting ready

Let's prepare our environment and create some initial code to test our autoloader.

  1. Create a fresh application by using yiic webapp.

  2. Download Zend Framework 1 code (the minimal version is enough...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Yii Application Development Cookbook - Second Edition
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon