Welcome to the Cookbook

loading...

3.6.1 Introduction

There is no translation yet for this section. Please help out and translate this.. More information about translations

Components are packages of logic that are shared between controllers. If you find yourself wanting to copy and paste things between controllers, you might consider wrapping some functionality in a component.

CakePHP also comes with a fantastic set of core components you can use to aid in:

  • Security
  • Sessions
  • Access control lists
  • Emails
  • Cookies
  • Authentication
  • Request handling

Each of these core components are detailed in their own chapters. For now, we’ll show you how to create your own components. Creating components keeps controller code clean and allows you to reuse code between projects.