Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed Jun 9, 2014
1 parent dcdd264 commit c8d3690
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## PHPExport

This is a small collection of classes enable you to export every class or
This is a small collection of classes that enable you to export every class or
even entire extension into PHP code or a PHP Archive (PHAR).

### Why this?
Expand All @@ -21,31 +21,36 @@ There are 3 ways to export an entire extension and 2 ways to export a single cla

1: Export a PHAR for the whole extension

<?php
$extension = new \ReflectionExtension('http');
$exporter = new \hollodotme\Helpers\PHPExport\ReflectionExtension($extension);
$exporter->exportPHAR('pecl_http.phar', '/var/www/lib', true);

2: Export all files for the whole extension (including sub directories by namespace depth)

<?php
$extension = new \ReflectionExtension('http');
$exporter = new \hollodotme\Helpers\PHPExport\ReflectionExtension($extension);
$exporter->exportFiles('/var/www/lib/http');

3: Just print all classes/interfaces/traits from the extension

<?php
header('Content-type: text/plain');
$extension = new \ReflectionExtension('http');
$exporter = new \hollodotme\Helpers\PHPExport\ReflectionExtension($extension);
echo $exporter->exportCode();

4: Export a single class/interface/trait to a file

<?php
$class = new \ReflectionClass('http\\Url');
$exporter = new \hollodotme\Helpers\PHPExport\ReflectionClass($class);
$exporter->exportFile('/var/www/lib/http/Url.php');

5: Just print a single class/interface/trait

<?php
header('Content-type: text/plain');
$class = new \ReflectionClass('http\\Url');
$exporter = new \hollodotme\Helpers\PHPExport\ReflectionClass($class);
Expand Down

0 comments on commit c8d3690

Please sign in to comment.