In the cake, components are used to store logic that can be used by several controllers. The directory is / app / controller / components. For example, if you have some kind of general utility logic, you will have a UtilComponent object and a file in / app / controlers / components called UtilComponent.php.
<?php class UtilComponent extends Object { function yourMethod($param) {
Then in your controller classes add:
var $components = array('Util');
Then you call methods like:
$this->Util->yourMethod($yourparam);
Additional Information:
Documentation
source share