public function token() {

		$session = new Session();

		$name  = $this -> getValue('_token-name');
		$value = $this -> getValue('_token-value');

		if((null !== $name && null !== $value && $session -> pull(['_token', $name]) !== $value) || null === $name || null === $value) {
			
			$instance = $this -> getMessageInstance();
			$instance :: setFieldnames(['_token']);
			$instance :: setError(null, '_token', 'Token mismatch');
			$this -> setPasses(false);
		}
	}
public function token() {

		$session = new Session();

		$name  = $this -> getValue('_token-name');
		$value = $this -> getValue('_token-value');

		if((null !== $name && null !== $value && $session -> pull(['_token', $name]) !== $value) || null === $name || null === $value) {
			
			$instance = $this -> getMessageInstance();
			$instance :: setFieldnames(['_token']);
			$instance :: setError(null, '_token', 'Token mismatch');
			$this -> setPasses(false);
		}
	}
public function token ( ) { $ session = new Session ( ) ; $ name = $ this -> getValue ( '_token-name' ) ; $ value = $ this -> getValue ( '_token-value' ) ; if ( ( null !== $ name && null !== $ value && $ session -> pull ( [ '_token' , $ name ] ) !== $ value ) || null === $ name || null === $ value ) { $ instance = $ this -> getMessageInstance ( ) ; $ instance :: setFieldnames ( [ '_token' ] ) ; $ instance :: setError ( null , '_token' , 'Token mismatch' ) ; $ this -> setPasses ( false ) ; } }
Validates token from input
@return array
Validates token from input