PHP Class Nette\Forms\Controls\CsrfProtection

Inheritance: extends HiddenField
ファイルを表示 Open project: nette/forms Class Usage Examples

Public Properties

Property Type Description
$session Nette\Http\Session

Public Methods

Method Description
__construct ( $message )
getControl ( ) : Nette\Utils\Html Generates control's HTML element.
getToken ( ) : string
loadHttpData ( ) : void Loads HTTP data.
setValue ( $value ) : self
validateCsrf ( CsrfProtection $control ) : boolean

Protected Methods

Method Description
attached ( $parent )

Private Methods

Method Description
generateToken ( $random = NULL ) : string
getSession ( ) : Session

Method Details

__construct() public method

public __construct ( $message )

attached() protected method

protected attached ( $parent )

getControl() public method

Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html
return Nette\Utils\Html

getToken() public method

public getToken ( ) : string
return string

loadHttpData() public method

Loads HTTP data.
public loadHttpData ( ) : void
return void

setValue() public method

public setValue ( $value ) : self
return self

validateCsrf() public static method

public static validateCsrf ( CsrfProtection $control ) : boolean
$control CsrfProtection
return boolean

Property Details

$session public_oe property

public Session,Nette\Http $session
return Nette\Http\Session