2017 © Pedro Peláez
 

library php-local-server

A class to manage PHP's built-in server

image

hub20xx/php-local-server

A class to manage PHP's built-in server

  • Monday, March 13, 2017
  • by hub20xx
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

PHP Local Server: A class to manage PHP's built-in server

Build Status, (*1)

You're on linux and you want a simple way to start and stop a local server., (*2)

Install

Via Composer, (*3)

$ composer require hub20xxx/php-local-server

Usage

require __DIR__ . '/vendor/autoload.php';

$docroot = __DIR__ . '/www';

// by default the server is running on 127.0.0.1:1111
$server = new PhpLocalServer\Server($docroot);

// you can specify the address and port
// in the constructor
$address = '127.0.0.2';
$port = '1234';
$server = new Server($docroot, $address, $port);

// or using the setters
$server = new Server($docroot);
$server->setAddress($address);
$server->setPort($port);

// setting environment variables
$server->setEnvironmentVariable('ENV', 'testing');
$server->setEnvironmentVariable('FOO', 'bar');

// starting the server
$server->start();

// using the server

// stopping the server
$server->stop();

// $server->stop() is called in the destructor in case you omit to stop the server

Testing

$ phpunit

License

MIT, (*4)

Credits / Thanks

This package was inpired by this blog post, (*5)

Many thanks :), (*6)

Contributing

If you'd like to contribute, please use Github (issues, pull requests etc)., (*7)

The Versions

13/03 2017

dev-master

9999999-dev

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.1.5

1.1.5.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.1.3

1.1.3.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.1.4

1.1.4.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.1.2

1.1.2.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.1.1

1.1.1.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.1.0

1.1.0.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in

13/03 2017

v1.0.0

1.0.0.0

A class to manage PHP's built-in server

  Sources   Download

MIT

The Development Requires

by Avatar hub20xx

php server dev class linux local built-in