/** * @param array $appMeta * @param CxnStore\CxnStoreInterface $cxnStore */ public function __construct($appMeta, $cxnStore, $cxnId) { parent::__construct(NULL, $cxnStore); $this->appMeta = $appMeta; $this->cxnId = $cxnId; $this->http = new Http\PhpHttp(); }
/** * @param array $appMeta * @param array $keyPair * @param CxnStore\CxnStoreInterface $cxnStore * * TODO Change contract, passing in AppStoreInterface instead of appMeta/keyPair. * This will allow hosting multiple apps in the same endpoint. */ public function __construct($appMeta, $keyPair, $cxnStore) { if (empty($keyPair)) { throw new CxnException("Missing keyPair"); } if (empty($keyPair)) { throw new CxnException("Missing cxnStore"); } parent::__construct(NULL, $cxnStore); $this->appStore = new SingletonAppStore($appMeta['appId'], $appMeta, $keyPair['privatekey'], $keyPair['publickey']); }
/** * @param CxnStore\CxnStoreInterface $cxnStore * The place to store active connections. * @param string $siteUrl * The callback URL used when the app wishes to send an API call to the site. */ public function __construct($cxnStore, $siteUrl) { parent::__construct(NULL, $cxnStore); $this->siteUrl = $siteUrl; }
/** * @param CxnStore\CxnStoreInterface $cxnStore * The place to store active connections. * @param string $siteUrl * The callback URL used when the app wishes to send an API call to the site. * @param string|NULL $viaPort * If $siteUrl is behind a firewall or otherwise unrouteable, you can * specify a proxy for any callback messages. * Ex: "123.123.123.123:456". * Ex: "proxy.example.com:789" * Ex: "dhcp123.isp.example.net:456" */ public function __construct($cxnStore, $siteUrl, $viaPort = NULL) { parent::__construct(NULL, $cxnStore); $this->siteUrl = $siteUrl; $this->viaPort = $viaPort; }
/** * @param CxnStore\CxnStoreInterface $cxnStore */ public function __construct($cxnStore, $router = NULL) { parent::__construct(NULL, $cxnStore); $this->router = $router; }