Skip to content

Commit

Permalink
Merge pull request #115 from poef/stdin
Browse files Browse the repository at this point in the history
added ar('loader')->stdin/stdout/stderr functions
  • Loading branch information
mjrider committed May 20, 2016
2 parents 2f7d3a2 + b7b8a4c commit 8432409
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/ar/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ public static function getvar( $name = null, $method = null ) {
return $loader->getvar( $name, $method );
}

public static function stdin() {
return new ar_content_filesFile( fopen('php://stdin','r') );
}

public static function stdout() {
return new ar_content_filesFile( fopen('php://stdin','w') );
}

public static function stderr() {
return new ar_content_filesFile( fopen('php://stderr','w') );
}

public static function makeURL( $path = '', $nls = '', $session = true, $https = null, $keephost = null ) {
$loader = self::getLoader();
if (!isset($keephost)) {
Expand Down

0 comments on commit 8432409

Please sign in to comment.