Private Methods

Navigation:  Development > MVC (Model View Controller) > Controller >

Private Methods

Previous pageReturn to chapter overviewNext page

The method we create in controller without Action keyword is called private method. Generally we use Private modifier in those methods.

 

For Example:
 
private function getTrimmedKey($keystr=""){
  return trim($keystr)
}

 

Private functions are used to do some internal execution in controller to avoid over head in Helpers.