public function __construct(AppConfig $config) { parent::__construct($config, null); // Don't terminate the script when the cli's tty goes away ignore_user_abort(true); $this->parseCommand(); }
/** * Takes an array of options to set the following possible class properties: * * - baseURI * - timeout * - any other request options to use as defaults. * * @param array $options */ public function __construct(AppConfig $config, URI $uri, ResponseInterface $response = null, array $options = []) { if (!function_exists('curl_version')) { throw new \RuntimeException('CURL must be enabled to use the CURLRequest class.'); } parent::__construct($config); $this->response = $response; $this->baseURI = $uri; $this->parseOptions($options); }
/** * Constructor * * @param type $config * @param type $uri * @param type $body */ public function __construct($config, $uri = null, $body = 'php://input') { // Get our body from php://input if ($body == 'php://input') { $body = file_get_contents('php://input'); } $this->body = $body; parent::__construct($config, $uri); $this->populateHeaders(); $this->uri = $uri; $this->detectURI($config->uriProtocol, $config->baseURL); }
public function __construct(AppConfig $config, $uri = null, $body = 'php://input') { // Get our body from php://input if ($body == 'php://input') { $body = file_get_contents('php://input'); } $this->body = $body; parent::__construct($config, $uri); $this->populateHeaders(); $this->uri = $uri; $this->detectURI($config->uriProtocol, $config->baseURL); $this->cookiePrefix = $config->cookiePrefix; $this->cookieDomain = $config->cookieDomain; $this->cookiePath = $config->cookiePath; $this->cookieSecure = $config->cookieSecure; $this->cookieHTTPOnly = $config->cookieHTTPOnly; }