Skip to content

Commit 2c63e0d

Browse files
committed
make library composer enabled
1 parent c363bc5 commit 2c63e0d

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ See the GNU Lesser General Public License for more details.
4343
How can I use it ?
4444
==================
4545

46-
use FastCGI\Client;
46+
require 'vendor/autoload.php';
4747

48-
require('fastcgi.php');
48+
use FastCGI\Client;
4949

5050
$client = new Client('localhost', '9000');
5151
$content = 'key=value';

composer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "adoy/fastcgi-client",
3+
"description": "Client for communication with a FastCGI (FCGI) application using the FastCGI protocol.",
4+
"keywords": ["fastcgi"],
5+
"license": "LGPL-2.1",
6+
"authors": [
7+
{
8+
"name": "Pierrick Charron",
9+
"email": "pierrick@php.net"
10+
}
11+
],
12+
"autoload": {
13+
"files": ["fastcgi.php"]
14+
}
15+
}

fcgiget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* See the GNU Lesser General Public License for more details.
1616
*/
1717

18+
require 'vendor/autoload.php';
19+
1820
use FastCGI\Client;
1921

2022
/**
@@ -24,8 +26,6 @@
2426
* @author Remi Collet <remi@famillecollet.com>
2527
* @version 1.0
2628
*/
27-
require('fastcgi.php');
28-
2929
if (!isset($_SERVER['argc'])) {
3030
die("Command line only\n");
3131
}

0 commit comments

Comments
 (0)