Admin Seperation

I thought of instead bloating the framework with different folders and logic seperations, to follow a more easier path, instead of the suggested methods I thought of implementing a url parsing mechanism.

So In my protected folders, and inside the controllers I created an admin folder, which stores the admin related controllers, after that inside the Controller.php file located inside protected/components I could implement the bellow:


protected function beforeAction($action)

	{


		$url_parts = explode('/', $this->getRoute());

		$is_admin = array_shift($url_parts);

		if(strcasecmp($is_admin, "admin") == 0)

		{

			do stuff for admin like login check

		} else {

			proceed normal

		}

	}

How would such an implementation feel?