Overview

Namespaces

  • Comprobo
    • Verify
      • Auth
      • Exceptions
      • HTTP

Classes

  • Comprobo\Verify\Api
  • Comprobo\Verify\Auth\Server
  • Comprobo\Verify\Factory
  • Comprobo\Verify\HTTP\Request
  • Comprobo\Verify\State
  • Comprobo\Verify\User
  • Comprobo\Verify\Workflow

Exceptions

  • Comprobo\Verify\Exceptions\Auth
  • Comprobo\Verify\Exceptions\Misconfiguration
  • Comprobo\Verify\Exceptions\User
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 
<?php
namespace Comprobo\Verify;

class State
{
    private $state = [];

    public function set($key, $value)
    {
        if (!is_string($key)) {
            throw new Exceptions\Misconfiguration("State keys must be strings");
        }

        $this->state[$key] = $value;
    }

    public function get($key)
    {
        return $this->state[$key];
    }

    public function has($key)
    {
        return array_key_exists($key, $this->state);
    }
}
API documentation generated by ApiGen