public function run() { $fastcgi = new Client($this->fcgi); $connection = $fastcgi->connect(); $request = $connection->newRequest(array('GATEWAY_INTERFACE' => 'FastCGI/1.0', 'REQUEST_METHOD' => 'GET', 'SERVER_SOFTWARE' => 'Drupal', 'SCRIPT_NAME' => '/index.php', 'SCRIPT_FILENAME' => DRUPAL_ROOT . '/index.php', 'QUERY_STRING' => $this->queryString, 'REQUEST_URI' => $this->uri, 'REMOTE_ADDR' => '127.0.0.1')); $connection->request($request); }
/** * @param string $address * @param null|int $port * * @return FastCGI\Connection */ protected function setupFastCgiConnection($address, $port = null) { if (substr($address, 0, 1) == '/') { $address = sprintf('unix://%s', $address); } $fastcgi = new FastCGI\Client($address, $port); return $fastcgi->connect(); }
public function __construct(Client $client) { $this->connection = $client->connect(); }