Cargando…

Yii 1.1 application development cookbook : over 80 recipes to help you master using the Yii PHP framework /

Over 80 recipes to help you master using the Yii PHP framework.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Makarov, Alexander
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Pub., 2011.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • 1. Under the Hood
  • Introduction
  • Using getters and setters
  • Using Yii events
  • Using import and autoloading
  • Using exceptions
  • Configuring components
  • Configuring widget defaults
  • Using Yii core collections
  • Working with requests
  • 2. Router, Controller, and Views
  • Introduction
  • 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 base controller
  • Using external actions
  • Displaying static pages with CViewAction
  • Using flash messages
  • Using controller context in a view
  • Reusing views with partials
  • Using clips
  • Using decorators
  • Defining multiple layouts
  • Paginating and sorting data
  • 3. AJAX and jQuery
  • Introduction
  • Loading a block through AJAX
  • Managing assets
  • Including resources into the page
  • Working with JSON
  • Passing configuration from PHP to JavaScript
  • Handling variable number of inputs
  • 4. Working with Forms
  • Introduction
  • Writing your own validators
  • Uploading files
  • Adding CAPTCHA
  • Customizing CAPTCHA
  • Creating a custom input widget with CInput/Widget
  • 5. Testing your Application
  • Introduction
  • Setting up the testing environment
  • Writing and running unit tests
  • Using fixtures
  • Testing the application with functional tests
  • Generating code coverage reports
  • 6. Database, Active Record, and Model Tricks
  • Introduction
  • Getting data from a database
  • Defining and using multiple DB connections
  • Using scopes to get models for different languages
  • Processing model fields with AR event-like methods
  • Applying markdown and HTML
  • Highlighting code with Yii
  • Automating timestamps
  • Setting an author automatically
  • Implementing single table inheritance
  • Using CDbCriteria.
  • 7. Using Zii Components
  • Introduction
  • Using dataproviders
  • Using grids
  • Using lists
  • Creating custom grid columns
  • 8. Extending Yii
  • Introduction
  • Creating model behaviors
  • Creating components
  • Creating reusable controller actions
  • Creating reusable controllers
  • Creating a widget
  • Creating CLI commands
  • Creating filters
  • Creating modules
  • Creating a custom view renderer
  • Making extensions distribution-ready
  • 9. Error handling, Debugging, and Logging
  • Introduction
  • Using different log routes
  • Analyzing the Yii error stack trace
  • Logging and using the context information
  • Implementing your own smart 404 handler
  • 10. Security
  • Introduction
  • Using controller filters
  • Using CHtml and CHtmlPurifier to prevent Xss
  • Preventing SQL injections
  • Preventing CSRF
  • Using RBAC
  • 11. Performance Tuning
  • Introduction
  • Following best practices
  • Speeding up sessions handling
  • Using cache dependencies and chains
  • Profiling an application with Yii
  • 12. Using External Code
  • Introduction
  • Using Zend Framework from Yii
  • Customizing the Yii autoloader
  • Using Kohana inside Yii
  • Using PEAR inside Yii
  • 13. Deployment
  • Introduction
  • Changing the Yii directories layout
  • Moving an application out of webroot
  • Sharing the framework directory
  • Moving configuration parts into separate files
  • Using multiple configurations to simplify the deployment
  • Implementing and executing cron jobs
  • Maintenance mode
  • 7. Using Zii Components
  • Introduction
  • Using dataproviders
  • Using grids
  • Using lists
  • Creating custom grid columns
  • 8. Extending Yii
  • Introduction
  • Creating model behaviors
  • Creating components
  • Creating reusable controller actions
  • Creating reusable controllers
  • Creating a widget
  • Creating CLI commands
  • Creating filters
  • Creating modules
  • Creating a custom view renderer
  • Making extensions distribution-ready
  • 9. Error handling, Debugging, and Logging
  • Introduction
  • Using different log routes
  • Analyzing the Yii error stack trace
  • Logging and using the context information
  • Implementing your own smart 404 handler
  • 10. Security
  • Introduction
  • Using controller filters
  • Using CHtml and CHtmlPurifier to prevent Xss
  • Preventing SQL injections
  • Preventing CSRF
  • Using RBAC
  • 11. Performance Tuning
  • Introduction
  • Following best practices
  • Speeding up sessions handling
  • Using cache dependencies and chains
  • Profiling an application with Yii
  • 12. Using External Code
  • Introduction
  • Using Zend Framework from Yii
  • Customizing the Yii autoloader
  • Using Kohana inside Yii
  • Using PEAR inside Yii
  • 13. Deployment
  • Introduction
  • Changing the Yii directories layout
  • Moving an application out of webroot
  • Sharing the framework directory
  • Moving configuration parts into separate files
  • Using multiple configurations to simplify the deployment
  • Implementing and executing cron jobs
  • Maintenance mode.
  • Table of Contents; Yii 1.1 Application Development Cookbook; Yii 1.1 Application Development Cookbook; Credits; Foreword; 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. Under the Hood; Introduction; Using getters and setters; How to do it ... ; How it works ... ; There's more ... ; See also.
  • Using Yii eventsHow to do it ... ; There's more ... ; Further reading; See also; Using import and autoloading; How to do it ... ; How it works ... ; There's more ... ; Using exceptions; How to do it ... ; How it works ... ; There's more ... ; Configuring components; How to do it ... ; How it works ... ; There's more ... ; See also; Configuring widget defaults; How to do it ... ; See also; Using Yii core collections; How to do it ... ; Working with request; How to do it ... ; There's more ... ; 2. Router, Controller, and Views; Introduction; Configuring URL rules; Getting ready; How to do it ... ; How it works ... ; There's more ...
  • Further readingSee also; Generating URLs by path; Getting ready; How to do it ... ; How it works ... ; There's more ... ; See also; Using regular expressions in URL rules; Getting ready; How to do it ... ; How it works ... ; There's more ... ; See also; Creating URL rules for static pages; Getting ready; How to do it ... ; How it works ... ; See also; Providing your own URL rules at runtime; Getting ready; How to do it ... ; How it works ... ; There's more ... ; See also; Using base controller; Getting ready; How to do it ... ; How it works ... ; Using external actions; Getting ready; How to do it ... ; How it works ...
  • There's more ... Displaying static pages with CViewAction; Getting ready; How to do it ... ; How it works ... ; There's more ... ; Further reading; See also; Using flash messages; Getting ready; How to do it ... ; How it works ... ; There's more ... ; Using controller context in a view; Getting ready; How to do it ... ; How it works ... ; There's more ... ; Reusing views with partials; Getting ready; How to do it ... ; How it works ... ; There's more ... ; See also; Using clips; Getting ready; How to do it ... ; How it works ... ; See also; Using decorators; Getting ready; How to do it ... ; How it works ... ; There's more ... ; See also.
  • Defining multiple layoutsGetting ready; How to do it ... ; How it works ... ; See also; Paginating and sorting data; Getting ready; How to do it ... ; How it works ... ; There's more ... ; 3. AJAX and jQuery; Introduction; Loading a block through AJAX; Getting ready; How to do it ... ; How it works ... ; There's more ... ; Prevent including a bundled jQuery; Further reading; See also; Managing assets; Getting ready; How to do it ... ; How it works ... ; There's more ... ; What is inside the assets directory?; Publishing an entire directory; Further reading; See also; Including resources into the page.