public function getName()
	{
		if (empty($this->_name))
		{
			$this->_name = \App::get('request')->getCmd('controller');

			if (!$this->_name)
			{
				$r = null;

				if (!preg_match('/View((view)*(.*(view)?.*))$/i', get_class($this), $r))
				{
					throw new Exception('Cannot get or parse view class name.', 500);
				}

				if (strpos($r[3], 'view'))
				{
					throw new Exception('Classname contains the substring "view" which causes problems when extracting the classname.', 500);
				}

				$this->_name = strtolower($r[3]);
			}
		}
		return $this->_name;
	}
public function getName()
	{
		if (empty($this->_name))
		{
			$this->_name = \App::get('request')->getCmd('controller');

			if (!$this->_name)
			{
				$r = null;

				if (!preg_match('/View((view)*(.*(view)?.*))$/i', get_class($this), $r))
				{
					throw new Exception('Cannot get or parse view class name.', 500);
				}

				if (strpos($r[3], 'view'))
				{
					throw new Exception('Classname contains the substring "view" which causes problems when extracting the classname.', 500);
				}

				$this->_name = strtolower($r[3]);
			}
		}
		return $this->_name;
	}
public function getName ( ) { if ( empty ( $ this -> _name ) ) { $ this -> _name = \ App :: get ( 'request' ) -> getCmd ( 'controller' ) ; if ( ! $ this -> _name ) { $ r = null ; if ( ! preg_match ( '/View((view)*(.*(view)?.*))$/i' , get_class ( $ this ) , $ r ) ) { throw new Exception ( 'Cannot get or parse view class name.' , 500 ) ; } if ( strpos ( $ r [ 3 ] , 'view' ) ) { throw new Exception ( 'Classname contains the substring "view" which causes problems when extracting the classname.' , 500 ) ; } $ this -> _name = strtolower ( $ r [ 3 ] ) ; } } return $ this -> _name ; }
Method to get the view name

The model name by default parsed using the classname, or it can be set
by passing a $config['name'] in the class constructor

@return  string  The name of the model
Method to get the view name