Пример #1
0
 /**
  * @{inheritDoc}
  */
 public function authorize(SessionInterface $session)
 {
     $connection = $session->getConnection();
     $credential = $this->getCredential();
     list($type, $data) = $this->parse($credential);
     array_unshift($data, $connection);
     call_user_func_array(self::FUNCTION_PREFIX . $type, array_filter($data));
     $session->setConnection($connection);
     return $session->valid();
 }
Пример #2
0
 /**
  * @{inheritDoc}
  */
 public function get($remoteFile = '', $localFile = '')
 {
     return $this->doRun(__METHOD__, func_get_args(), ssh2_scp_recv($this->session->getConnection(), $remoteFile, $localFile));
 }