Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stdin to be a stream #30

Merged
merged 3 commits into from
Feb 16, 2018
Merged

Allow stdin to be a stream #30

merged 3 commits into from
Feb 16, 2018

Conversation

Arzaroth
Copy link
Contributor

A small change to allow stdin to be stream.
The goal is to emulate a left redirection (e.g. <file wc -c)
A small test is provided.

Marc-Etienne Barrut and others added 2 commits February 14, 2018 15:08
@@ -172,7 +172,7 @@ public function setCommand($command)
}

/**
* @param string $stdIn If set, the string will be piped to the command via standard input.
* @param string|resource $stdIn If set, the string will be piped to the command via standard input.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arzaroth Maybe add a little note about the resource type here? E.g. "This can also be a resource like a file handle in which case the file content will be piped into the command."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

@mikehaertl mikehaertl merged commit 727e214 into mikehaertl:master Feb 16, 2018
@mikehaertl
Copy link
Owner

Looks good. Thanks!

@mikehaertl
Copy link
Owner

Just released 1.4.0 including your addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants