Call a funtion from actionMethod()

Hello, I have:




class DetalleDispoController extends Controller

{

	

    public function actionDeleteAll(){

          $a = AddName();

        

    }


    public function actionCreate() { 

       $a = AddName();

    }


    public function actionView() { 

       $a = AddName();

    }


    public function AddName() { 

       return 2+3;

    }

}

   



I need call the function AddName in each method of controller. How can I do it?

Thanks you very much :)

I could do it.

The solution is:


$this->AddName()