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
Yii Application Development Cookbook - Second Edition
Yii Application Development Cookbook - Second Edition

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. , Second Edition

eBook
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Yii Application Development Cookbook - Second Edition

Chapter 2. Router, Controller, and Views

In this chapter, we will cover:

  • Configuring URL rules

  • Generating URLs by path

  • Using regular expressions in URL rules

  • Creating URL rules for static pages

  • Providing your own URL rules at runtime

  • Using a base controller

  • Using external actions

  • Displaying static pages with CViewAction

  • Using flash messages

  • Using the controller context in a view

  • Reusing views with partials

  • Using clips

  • Using decorators

  • Defining multiple layouts

  • Paginating and sorting data

Introduction


This chapter will help you to learn some handy things about the Yii URL router, controllers, and views. You will be able to make your controllers and views more flexible.

Configuring URL rules


The Yii URL router is quite powerful and does two main tasks: it resolves URLs into internal routes and creates URLs from these routes. Router rules description is scattered over the official Yii guide and API docs. Let's try to understand how to configure application rules by example.

Getting ready

  1. Create a fresh Yii application using yiic webapp as described in the official guide (http://www.yiiframework.com/doc/guide/) and find your protected/config/main.php file. It should contain the following:

    // application components
    'components'=>array(
       …
      // uncomment the following to enable URLs in path-format
    'urlManager'=>array(
          'urlFormat'=>'path',
          'rules'=>array(
             '<controller:\w+>/<id:\d+>'=>'<controller>/view',
             '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
             '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
     ...

Generating URLs by path


Yii allows you to not only route your URLs to different controller actions but also to generate a URL by specifying a proper internal route and its parameters. This is really useful because you can focus on internal routes while developing your application, and only worry about real URLs before going live.

Tip

Never specify URLs directly and make sure you use the Yii URL toolset. It will allow you to change URLs without rewriting a lot of application code.

Getting ready

  1. Create a fresh Yii application using yiic webapp as described in the official guide and find your protected/config/main.php file. Replace the rules array as follows:

    // application components
    'components'=>array(
       …
       // uncomment the following to enable URLs in path-format
       /*
       'urlManager'=>array(
          'urlFormat'=>'path',
          'rules'=>array(
          '<alias:about>' => 'website/page',
          'page/about/<alias:authors>' => 'website/page',
          'page/<alias>...

Using regular expressions in URL rules


One of the hidden features of the Yii URL router is that you can use regular expressions that are pretty powerful when it comes to strings handling.

Getting ready

  1. Create a fresh Yii application using yiic webapp as described in the official guide and find your protected/config/main.php file. It should contain the following:

    // application components
    'components'=>array(
       …
       // uncomment the following to enable URLs in path-format
       /*
       'urlManager'=>array(
          'urlFormat'=>'path',
          'rules'=>array(
             '<controller:\w+>/<id:\d+>'=>'<controller>/view',
             '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
              '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
          ),
       ),
  2. Delete everything from rules as we are going to start from scratch.

  3. In your protected/controllers directory, create PostController.php with...

Creating URL rules for static pages


A website typically contains some static pages. Usually, they include /about, /contact, /tos, and so on, and it is common to handle these pages in a single controller action. Let's find a way to create URL rules for these types of pages.

Getting ready

  1. Create a fresh Yii application using yiic webapp as described in the official guide and find your protected/config/main.php file. It should contain the following:

    // application components
    'components'=>array(
       …
       // uncomment the following to enable URLs in path-format
       /*
       'urlManager'=>array(
          'urlFormat'=>'path',
          'rules'=>array(
             '<controller:\w+>/<id:\d+>'=>'<controller>/view',
             '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
             '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
          ),
       ),
  2. Delete everything from rules as we are going to start...

Providing your own URL rules at runtime


When you are developing an application with a pluggable module architecture, you most likely need to somehow inject your module-specific rules into an existing application.

Getting ready

  1. Set up a new application using yiic webapp.

  2. Add .htaccess, shown in the official URL management guide to your webroot folder.

  3. Uncomment the urlManager section in protected/config/main.php and add 'showScriptName' => false.

  4. Generate the page module using Gii. You need to uncomment the gii section under modules and set a password. Then, open http://localhost/gii in your browser.

  5. Don't forget to add your new module to the modules list in your application configuration.

The Yii code generator is shown in the following screenshot:

How to do it...

  1. Create ModuleUrlManager.php in your protected/components directory with the following code inside it:

    <?php
    class ModuleUrlManager
    {
      static function collectRules()
      {
        if(!empty(Yii::app()->modules))
        {
           foreach(Yii...

Using a base controller


In many frameworks, the concept of a base controller that is being extended by other ones is described right in the guide. In Yii, it is not in the guide as you can achieve flexibility in many other ways. Still, using a base controller is possible and can be useful.

Getting ready

We are going to set up a new application using yiic webapp.

Let's say we want to add some controllers that will be accessible only when the user is logged in. We can surely set this constraint for each controller separately, but we will do it in a better way.

How to do it...

  1. First, we will need a base controller that our user-only controllers will use. Let's create SecureController.php in the protected/components directory with the following code:

    <?php
    class SecureController extends Controller
    {
        public function filters()
        {
            return array(
                'accessControl',
            );
        }
    
        public function accessRules()
        {
            return array(
                array('allow', 
      ...

Using external actions


In Yii, you can define controller actions as separate classes and then connect them to your controllers. This way, you can reuse some common functionality.

For example, you can move the backend for autocomplete fields to an action and save some time by not having to write it over and over again.

Another simple example that we will review is deleting a model.

Getting ready

  1. Set up a new application using yiic webapp.

  2. Create a database schema with the following script:

    CREATE TABLE `post` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `created_on` int(11) unsigned NOT NULL,
      `title` varchar(255) NOT NULL,
      `content` text NOT NULL,
      PRIMARY KEY  (`id`)
    );
    
    
    CREATE TABLE `user` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `username` varchar(200) NOT NULL,
      `password` char(40) NOT NULL,
      PRIMARY KEY  (`id`)
    );
  3. Generate the Post and User models using Gii. Add some data to the tables.

How to do it...

  1. Let's write protected/controllers/PostController.php. It is a usual...

Displaying static pages with CViewAction


If you have a few static pages and aren't going to change them very frequently, then it's not worth querying the database and implementing page management for them.

Getting ready

Set up a new application using yiic webapp.

How to do it...

  1. We just need to connect CViewAction to our controller.

    class SiteController extends CController
    {
       function actions()
       {
          return array(
             'page'=>array(
                'class'=>'CViewAction',
            ),
          );
       }
    }
  2. Now, put your pages into protected/views/site/pages, and name them about.php and contact.php.

  3. Now, you can try your pages by typing in the URL http://example.com/index.php?r=site/page&view=contact.

  4. Alternatively, you can type in the URL http://example.com/site/page/view/about, if you have configured clean URLs with a path format.

How it works...

We connect the external action named CViewAction that simply tries to find a view named the same as the $_GET parameter supplied. If it is there...

Using flash messages


When you are editing a model with a form, when you are deleting a model, or doing any other operation, it is good to tell users if it went well or if there was an error. Typically, after some kind of action, such as editing a form, a redirect will happen and we need to display a message on the page we want to go to. However, how do we pass it from the current page to the redirect target and clean up afterwards? Flash messages will help us.

Getting ready

Set up a new application using yiic webapp.

How to do it...

  1. Let's create a protected/controllers/WebsiteController.php controller as follows:

    class WebsiteController extends CController
    {
       function actionOk()
       {
          Yii::app()->user->setFlash('success', 'Everything went fine!');
          $this->redirect('index');
       }
    
       function actionBad()
       {
          Yii::app()->user->setFlash('error', 'Everything went wrong!');
          $this->redirect('index');
       }
    
       function actionIndex()
       {
          $this->render...

Using the controller context in a view


Yii views are pretty powerful and have many features. One of them is that you can use controller context in a view. So, let's try it.

Getting ready

Set up a new application using yiic webapp.

How to do it...

  1. Create a controller as follows:

    class WebsiteController extends CController
    {   
       function actionIndex()
       {
          $this->pageTitle = 'Controller context test';
          $this->render('index');
       }
    
       function hello()
       {
          if(!empty($_GET['name']))
             echo 'Hello, '.$_GET['name'].'!';
       }
    }
  2. Now, we will create a view showing what we can do:

    <h1><?php echo $this->pageTitle?></h1>
    <p>Hello call. <?php $this->hello()?></p>
    <?php $this->widget('zii.widgets.CMenu',array(
       'items'=>array(
          array('label'=>'Home', 'url'=>array('index')),
          array('label'=>'Yiiframework home', 'url'=>'http://yiiframework.ru/'),
       ),
    ))?>
  3. In order to test it you can follow /index.php...

Reusing views with partials


Yii supports partials, so if you have a block without much logic that you want to reuse or want to implement e-mail templates, partials are the right way to go about this.

Getting ready

  1. Set up a new application using yiic webapp.

  2. Create WebsiteController as follows:

    class WebsiteController extends CController
    {
       function actionIndex()
       {
          $this->render('index');
       }
    }
  3. Set up a database using the following SQL:

    CREATE TABLE `user` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `name` varchar(200) NOT NULL,
      `email` varchar(200) NOT NULL,
      PRIMARY KEY  (`id`)
      );
  4. Use Gii to generate the User model.

  5. Add some data to the user table.

How to do it...

We will start with a reusable block. For example, we need to embed a YouTube video on several website pages. Let's implement a reusable template for it.

  1. Create a view file named protected/views/common/youtube.php and paste an embed code from YouTube. You will get something like the following:

    <object width...

Using clips


One of the Yii features you can use in your views is clips . The basic idea is that you can record some output and then reuse it later in a view. A good example would be defining additional content regions for your layout and filling them elsewhere.

Getting ready

Set up a new application using yiic webapp.

How to do it...

  1. For our example, we need to define two regions in our layout: beforeContent and footer. Open protected/views/layouts/main.php and insert the following code line just before the content output (<?php echo $content; ?>):

    <?php if(!empty($this->clips['beforeContent'])) echo $this->clips['beforeContent']?>

    Then, insert the following into <div id="footer">:

    <?php if(!empty($this->clips['footer'])) echo $this->clips['footer']?>
  2. That is it! Now, we need to fill these regions somehow. We will use a controller action for the beforeContent region. Open protected/controllers/SiteController.php and add the following code to actionIndex:

    $this...

Using decorators


In Yii, we can enclose content into a decorator. The common usage of decorators is layout. Yes, when you are rendering a view using the render method of your controller, Yii automatically decorates it with the main layout. Let's create a simple decorator that will properly format quotes.

Getting ready

Set up a new application using yiic webapp.

How to do it...

  1. First, we will create a decorator file, protected/views/decorators/quote.php:

    <div class="quote">
       &ldquo;<?php echo $content?>&rdquo;, <?php echo $author?>
    </div>
  2. Now in protected/views/site/index.php, we will use our decorator:

    <?php $this->beginContent('//decorators/quote', array('author' => 'Edward A. Murphy'))?>
    If anything bad can happen, it probably will
    <?php $this->endContent()?>
  3. Now, your home page should include the following markup:

    <div class="quote">
       &ldquo;If anything bad can happen, it probably will&rdquo;, Edward A. Murphy
    </div>

How...

Defining multiple layouts


Most applications use a single layout for all their views. However, there are situations when multiple layouts are needed. For example, an application can use different layouts on different pages: two additional columns for blogs, one additional column for articles, and no additional columns for portfolios.

Getting ready

Set up a new application using yiic webapp.

How to do it...

  1. Create two layouts in protected/views/layouts: blog and articles. Blog will contain the following code:

    <?php $this->beginContent('//layouts/main')?>
    <div>
    <?php echo $content?>
    </div>
    <div class="sidebar tags">
       <ul>
          <li><a href="#php">PHP</a></li>
          <li><a href="#yii">Yii</a></li>
       </ul>
    </div>
    <div class="sidebar links">
       <ul>
          <li><a href="http://yiiframework.com/">Yiiframework</a></li>
          <li><a href="http://php.net/"&gt...

Paginating and sorting data


In the latest Yii releases, the focus was moved from using Active Record directly to grids, lists, and data providers. Still, sometimes it is better to use Active Record directly. Let's see how to list paginated AR records with the ability to sort them.

Getting ready

  1. Set up a new application using yiic webapp.

  2. Create a database structure table post with id and title as fields, and add 10 to 20 records.

  3. Generate the Post model using Gii.

How to do it...

  1. First, you need to create protected/controllers/PostController.php:

    class PostController extends Controller
    {
      function actionIndex()
      {
        $criteria = new CDbCriteria();
        $count=Post::model()->count($criteria);
        $pages=new CPagination($count);
    
        // elements per page
        $pages->pageSize=5;
        $pages->applyLimit($criteria);
    
        // sorting
        $sort = new CSort('Post');
        $sort->attributes = array(
           'id',
           'title',
        );
        $sort->applyOrder($criteria);
    
        $models = Post::model...
Left arrow icon Right arrow icon

Key benefits

  • Learn how to use Yii even more efficiently
  • Full of practically useful solutions and concepts you can use in your application
  • Both important Yii concept descriptions and practical recipes are inside

Description

The Yii framework is a rapidly growing PHP5 MVC framework often referred to as Rails for PHP. It has already become a solid base for many exciting web applications such as Stay.com and can be a good base for your developments, too. This book will help you to learn Yii quickly and in more depth for use in for your developments."Yii Application Development Cookbook" will show you how to use Yii efficiently. You will learn about taking shortcuts using core features, creating your own reusable code base, using test driven development, and many more topics that will give you a lot of experience in a moderate amount of time.The second edition fixes all errata found in the first edition and also features new recipes on the client side, HTTP caching, and using Composer with Yii.The chapters of the book are generally independent and since this book's goal is to enhance a practical approach to Yii development, you can start reading from the chapter you need most, be it Ajax and jQuery, Database, Active Record, and Model Tricks, or Extending Yii."Yii Application Development Cookbook" will help you to learn more about the Yii framework and application development practices in general, showing shortcuts and dangerous things you shouldn't do.With all the recipes grouped in 13 chapters, you will write your applications more efficiently using shortcuts and using Yii core functionality in a good way. The most interesting topics are; Yii application deployment, a guide to writing your own extensions, advanced error handling, debugging and logging, application security, performance tuning, and much more."Yii Application Development Cookbook" will help you to learn more about the Yii framework and application development practices in general. You will write your applications more efficiently using shortcuts and using Yii core functionality in a good way.

Who is this book for?

This book is for developers with good PHP5 knowledge who have tried to develop applications using Yii. An object-oriented approach and MVC knowledge will be a great advantage as Yii uses these extensively.

What you will learn

  • Make use of internal Yii features, such as events and collections
  • Get the maximum out of your controller and views and make them reusable
  • Work with jQuery, JavaScript, and AJAX the Yii way
  • Make your application error-free using TDD approach
  • Use Active Record efficiently
  • Utilize Zii components such as grids and data providers
  • Implement, package, and share your code as a reusable extension
  • Tune your application for better performance and also learn general performance principles and Yii-related settings

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 25, 2013
Length: 408 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782163114
Vendor :
Microsoft
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 25, 2013
Length: 408 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782163114
Vendor :
Microsoft
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 73.98
Yii Application Development Cookbook - Second Edition
$48.99
Instant Building Multi-Page Forms with Yii How-to
$24.99
Total $ 73.98 Stars icon

Table of Contents

13 Chapters
Under the Hood Chevron down icon Chevron up icon
Router, Controller, and Views Chevron down icon Chevron up icon
AJAX and jQuery Chevron down icon Chevron up icon
Working with Forms Chevron down icon Chevron up icon
Testing Your Application Chevron down icon Chevron up icon
Database, Active Record, and Model Tricks Chevron down icon Chevron up icon
Using Zii Components Chevron down icon Chevron up icon
Extending Yii Chevron down icon Chevron up icon
Error Handling, Debugging, and Logging Chevron down icon Chevron up icon
Security Chevron down icon Chevron up icon
Performance Tuning Chevron down icon Chevron up icon
Using External Code Chevron down icon Chevron up icon
Deployment Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(14 Ratings)
5 star 50%
4 star 28.6%
3 star 7.1%
2 star 0%
1 star 14.3%
Filter icon Filter
Top Reviews

Filter reviews by




P. Wright Apr 06, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A book you'll keep referring to, so that's got to be good. Exactly what it says on the cover "recipe" so you pick and choose and adapt the code to suit your own projects. You'll need to have had a play with Yii , "get" the whole framework thing, be an OOPHP convert and be ready to build your first project. Although its possible to find most of what you want to do online, I still enjoy a book to read and see the techniques used in the context of a project feature or function. I think its a great supplement to online documentation and can help you make better sense of it. I've enjoyed reading this book.
Amazon Verified review Amazon
R. Engelmann Sep 13, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Nichts für Anfänger, aber wer schon mal was mit Yii gemacht hat und sein Wissen vertiefen möchte, für den ist das Buch genau richtig. Liest sich gut und es kommen interessante Tips drin vor...
Amazon Verified review Amazon
Abdelaziz Bennouna Jun 14, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
DISCLAIMER: I got a free review copy of the eBook version of "Yii Application Development Cookbook - Second Edition" from the publisher.I was really excited to dive into Alexander Makarov's Yii book, mainly because he is a member of the Yii framework core team, and also one of the most helpful contributors in the Yii forum. I however took the time to read the book from cover to cover over a week, and while I've read each recipe including the printed code, I haven't tested any specific one.I personally like cookbooks, but this one shouldn't be relied on to learn Yii from scratch, as it is intended for PHP developers that are already familiar with the framework. It lists 90 recipes split over the same 13 independent chapters that were already organizing the first edition. One of the issues with that approach is that you end up with recipe groups rather than logical chapters, but that shouldn't stop you from studying and testing individual recipes.This edition corrects the errata found in the first one (and adds a few), and uses a more comfortable monospace font for code listings and code words. Compared to the first edition, all original recipes seem to be kept in place, and there are only 3 new ones. For the lazy, Alexander Makarov also created a GitHub repository with the code provided in most of the recipes.What I specially liked in this cookbook is that the author shares his deep knowledge of Yii's core mechanisms, and implements beautiful reusable code in efficient --and tasteful-- efficient recipes, with a steady goal of performance. And although the recipes are independent, some are in fact linked or complementary, and each can be learnt and used straight away without any prerequisite. It however took me some recipes --the whole first chapter in fact-- to get used to the "How to do it.../How it works..." structure.It's a pity that the table of contents is rather conservative and names recipes after Yii features or concepts, and not according to the recipe result. I would have preferred recipes named like "Learn to code a complete to-do webapp in Yii using REST, JSON, and doT" instead of (or in addition to) "Rendering content at the client side", or at least an alternative summary with recipes' achievements.The intrinsic value of most of recipes is high or very high: I rated most of them 4 or 5/5. One outstanding exception is the "Chapter 7: Using Zii Components" because its 4 recipes are below par, and what can be found in the Yii Wikis regarding Zii widgets usage and customization is far more interesting.I rate "Yii Application Development Cookbook - Second Edition" 4,5/5 to leave some room of improvement. It is nonetheless an excellent addition to Yii books in general and provides several unique and enlightening recipes that are extremely useful and inspiring to the serious Yii 1.1.x developer.
Amazon Verified review Amazon
Amazon Customer Jun 16, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The cookbook covers practical Yii application development tips which will help you develop better applications, and it also has recipes for important Yii features which are very useful to know.The book is written by Alexander Makarov who is an experienced engineer from Russia and has been a Yii framework core team member since 2010. He also was the technical reviewer for three other books related to Yii, so you can be sure the cookbook is written by someone who knows inner workings of Yii framework.The cookbook has a similar format to other PacktPub cookbooks and is easy to follow, but you should have at least a basic understanding on how Yii framework works before starting with recipes. The recipes are split to 13 chapters that will show you how to use Yii efficiently.The cookbook contains 90 recipes (if my finger counting is correct) and covers a wide range of topics. Recipes could be categorized in: simple recipes (you're probably already using them), advanced (or good to know) recipes, complex recipes (which will need more fiddling around to completely understand how they work) and recipes which will make you question yourself "Why the hell I'm not using this in my application?".If you're serious about learning Yii framework you should definitely buy this book. Even if you already have a good understanding of Yii framework I'm sure you will find recipes which will make you even better. Of course if you're just thinking about learning Yii framework you shouldn't start with this book.You can find a more in-depth review at the following page http://www.ifdattic.com/2013/06/02/review-of-yii-application-development-cookbook-se
Amazon Verified review Amazon
Amr Feb 07, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is essential if you want to master YII. The book also explains some of the most advanced features you'll need to build a rich Yii website.If you want to save your time and learn Yii in short time, follow as much as you can from this book
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon