Get Internal actions of a controller

I would expect that this method would exist inside CController although I didn’t find it.

Did I miss anything?

Anyways here is my implementation:




        public function getInternalActions()	//except index

	{

		$methods = get_class_methods($this);

		$inActions = array();

		foreach($methods as $method)

		{

			if($method=='actionIndex')	continue;

			if( substr($method, 0, strlen('action')) == 'action' && ctype_upper($method[strlen('action')]) )

				$inActions[] = $method;

		}

		return $inActions;

	}



This was useful to create the right menu automatically for all internal actions ;)

Not best for all cases, but this time was suitable

This is just what I was seeking. I’ll give it a try. :D