src/ChickenWire/Controller.php
private function _invokeAuthLoginAction()
		{

			// Try to instatiate the login controller (without executing the request)
			$login = new $this->auth->loginController($this->request, false);
			
			// Does it have the method?
			if (method_exists($login, $this->auth->loginAction)) {

				// Is it public?
				$reflection = new \ReflectionMethod($login, $this->auth->loginAction);
				if (!$reflection->isPublic()) {

					throw new \Exception("The method '" . $this->auth->loginAction . "' on " . get_class($login) . " is not public.", 1);				

				}

				// Send not auth!
				Http::sendStatus(401);
				

				// Call action
				$reflection->invoke($login);

			} else {

				throw new \Exception("There is no method '" . $this->auth->loginAction . "' on " . get_class($login), 1);				

			}


		}
private function _invokeAuthLoginAction()
		{

			// Try to instatiate the login controller (without executing the request)
			$login = new $this->auth->loginController($this->request, false);
			
			// Does it have the method?
			if (method_exists($login, $this->auth->loginAction)) {

				// Is it public?
				$reflection = new \ReflectionMethod($login, $this->auth->loginAction);
				if (!$reflection->isPublic()) {

					throw new \Exception("The method '" . $this->auth->loginAction . "' on " . get_class($login) . " is not public.", 1);				

				}

				// Send not auth!
				Http::sendStatus(401);
				

				// Call action
				$reflection->invoke($login);

			} else {

				throw new \Exception("There is no method '" . $this->auth->loginAction . "' on " . get_class($login), 1);				

			}


		}
private function _invokeAuthLoginAction ( ) { // Try to instatiate the login controller (without executing the request) $ login = new $ this -> auth -> loginController ( $ this -> request , false ) ; // Does it have the method? if ( method_exists ( $ login , $ this -> auth -> loginAction ) ) { // Is it public? $ reflection = new \ ReflectionMethod ( $ login , $ this -> auth -> loginAction ) ; if ( ! $ reflection -> isPublic ( ) ) { throw new \ Exception ( "The method '" . $ this -> auth -> loginAction . "' on " . get_class ( $ login ) . " is not public." , 1 ) ; } // Send not auth! Http :: sendStatus ( 401 ) ; // Call action $ reflection -> invoke ( $ login ) ; } else { throw new \ Exception ( "There is no method '" . $ this -> auth -> loginAction . "' on " . get_class ( $ login ) , 1 ) ; } }
Invoke the Login action for the Controller's Auth object
@return void
Invoke the Login action for the Controller s Auth object