Vote Details for "Net_SSH2" by cweiske

» Details
» Comment
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.