private function handleSessions()
	{
		if ($this->getRouter()->hasRoute()) {
			if (!$this->getRouter()->getRoute()->isPublic() || $this->getRouter()->getRoute()->allowSessions()) {
				if ($this->getSetting('userservice')) {
					try
					{
						if ($this->getSetting('userclass') === false) throw new PlinthException('Please define a user class and user repository');

						$this->getUserService()->setUserRepository($this->getEntityRepository()->getRepository($this->getSetting('userclass')));

						session_start();
					}
					catch (PlinthException $e)
					{
						throw $e;
					}
				} else {
					session_start();
				}
			}
		}
    }
private function handleSessions()
	{
		if ($this->getRouter()->hasRoute()) {
			if (!$this->getRouter()->getRoute()->isPublic() || $this->getRouter()->getRoute()->allowSessions()) {
				if ($this->getSetting('userservice')) {
					try
					{
						if ($this->getSetting('userclass') === false) throw new PlinthException('Please define a user class and user repository');

						$this->getUserService()->setUserRepository($this->getEntityRepository()->getRepository($this->getSetting('userclass')));

						session_start();
					}
					catch (PlinthException $e)
					{
						throw $e;
					}
				} else {
					session_start();
				}
			}
		}
    }
private function handleSessions ( ) { if ( $ this -> getRouter ( ) -> hasRoute ( ) ) { if ( ! $ this -> getRouter ( ) -> getRoute ( ) -> isPublic ( ) || $ this -> getRouter ( ) -> getRoute ( ) -> allowSessions ( ) ) { if ( $ this -> getSetting ( 'userservice' ) ) { try { if ( $ this -> getSetting ( 'userclass' ) === false ) throw new PlinthException ( 'Please define a user class and user repository' ) ; $ this -> getUserService ( ) -> setUserRepository ( $ this -> getEntityRepository ( ) -> getRepository ( $ this -> getSetting ( 'userclass' ) ) ) ; session_start ( ) ; } catch ( PlinthException $ e ) { throw $ e ; } } else { session_start ( ) ; } } } }
Handle session_start when needed

@throws PlinthException
Handle session_start when needed