CakePHP Ticket Component
In order to call each time the garbage function just create a 

public function beforeFilter() {
        parent::beforeFilter();
        $this-&gt;garbage();


About the new Ticket()
i think it would be okay to change the

$ticketObj-&gt;..


to 

$this-&gt;Ticket-&gt;..


Also i think setting your function name's as set is a bad idea because they are built in functions in cakephp