[PEPr] +1 for Networking::Net_SSH2
| From: | Christian Weiske | Date: | Mon, 21 Sep 2009 18:24:33 +0000 |
| Subject: | [PEPr] +1 for Networking::Net_SSH2 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52867@lists.php.net to get a copy of this message | ||
Christian Weiske (http://pear.php.net/user/cweiske) has voted +1 on the proposal for
Networking::Net_SSH2.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=586
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=586&handle=cweiske
This vote is conditional. The condition is:
I generally like the package, but not the specific implementation.
1. Very minor - multiline function calls and array options are not formatted according to the CS.
2. Major: Your action methods modifiy the object settings permanently. When passing some options to
scpSend(), they are set in the object options, making them persistent. They will stay for further
method calls. If I wanted that, I'd set the options myself via $ssh->$option = $value.
3. Major: What is the reasoning behind your method signatures?
scpSend(&$std_output, &$std_error, $options = array())
sshCopyId(&$std_output, &$std_error, $options = array())
sshKeyGen(&$std_output, &$std_error, $options = array())
That's not what I would expect. Why am I interested in stdoutput and stderr? Why do I have to
specifiy my parameters in the options array? That's nonsense.
When I want to copy a file, I'd like to call $ssh->copy($local, $remote), thank you. Not
$ssh->scpSend($out, $in, array('local_path' => 'foo',
'remote_path' => 'bar')) - that's no nice api.
4. There are no example files (I don't count unit tests as examples)
I say +1 here because I like the package idea. I do not like the current implementation. My +1 is
only valid if you redesign your API completely.