Class: Login_Controller

Source Location: /tinymvc/myapp/controllers/login.php

Class Overview [line 13]

AbstractController
   |
   --Login_Controller

Handles login and logout requests, and user registration.

Author(s):

  • Monte Ohrt

Version:

Copyright:

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods



Class Details

Handles login and logout requests, and user registration.

Tags:

[ Top ]


Class Variables


Class Methods

index

void index( )

[line 19]

The default action. Defaults to login()

Tags:

Overrides AbstractController::index() (index)

Parameters:

[ Top ]

login

void login( string $username, string $password, string $redirect, bool $json)

[line 30]

Logs the user in.

Parameters:

  • string $username - The username to log in with.
  • string $password - The password to log in with should match $username's password.
  • string $redirect - The page to redirect to when finished. If left blank, redirects to default controller.
  • bool $json - Specifies that we want JSON-style output. Used for AJAX calls. Defaults to false.

[ Top ]

logout

void logout( string $redirect, bool $json)

[line 78]

Logs the current user out.

Parameters:

  • string $redirect - The page to redirect to when finished. If left blank, redirects to the default page.
  • bool $json - Specifies that we want JSON-style output. Used for AJAX calls. Defaults to false.

[ Top ]

register

void register( string $username, string $password, string $redirect)

[line 106]

Registers the user with the given information.

Parameters:

  • string $username - The desired username.
  • string $password - The desired password.
  • string $redirect - Where to redirect after registration complete. If not specified, uses default controller.

[ Top ]


Class Constants


Documentation generated on Tue, 26 May 2009 14:50:35 -0700 by phpDocumentor 1.4.1