Gajus\Fuss\App::__construct PHP Method

__construct() public method

public __construct ( integer $app_id, string $app_secret, array $options = [] )
$app_id integer App ID.
$app_secret string App secret.
$options array
    public function __construct($app_id, $app_secret, array $options = [])
    {
        $this->app_id = (int) $app_id;
        $this->app_secret = (string) $app_secret;
        foreach ($options as $name => $value) {
            $this->setOption($name, $value);
        }
        if (isset($_POST['signed_request'])) {
            $this->setSignedRequest($_POST['signed_request']);
        } else {
            if (isset($_SESSION['gajus']['fuss'][$this->getId()]['signed_request'])) {
                $this->setSignedRequest($_SESSION['gajus']['fuss'][$this->getId()]['signed_request']);
            } else {
                if (isset($_COOKIE['fbsr_' . $this->getId()])) {
                    $this->setSignedRequest($_COOKIE['fbsr_' . $this->getId()]);
                }
            }
        }
        if ($this->getOption(self::OPTION_FORCE_COOKIE)) {
            $this->bypassThirdPartyCookie();
        }
    }