pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\KeyStoreLoader\File Class Reference

Public Member Functions

 __construct (\fpoirotte\Pssht\KeyStore $store=null)
 
 getStore ()
 
 load ($user, $file)
 
 loadBulk (array $bulk)
 

Protected Attributes

 $store
 Storage object for the keys.
 

Detailed Description

Public keys loader from a file.

Definition at line 20 of file File.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\KeyStoreLoader\File::__construct ( \fpoirotte\Pssht\KeyStore  $store = null)

Construct a new loader.

Parameters
fpoirotte::Pssht::KeyStore$store(optional) Object where the keys will be stored. If omitted, a new (empty) store is automatically created.

Definition at line 33 of file File.php.

References fpoirotte\Pssht\KeyStoreLoader\File\$store.

Member Function Documentation

fpoirotte\Pssht\KeyStoreLoader\File::getStore ( )

Return the key store associated with this loader.

Return values
fpoirotte::Pssht::KeyStoreThe store for this loader.

Definition at line 144 of file File.php.

References fpoirotte\Pssht\KeyStoreLoader\File\$store.

fpoirotte\Pssht\KeyStoreLoader\File::load (   $user,
  $file 
)

Load the keys in the given file as if they belonged to the specified user.

Parameters
string$userUser the keys belong to.
string$fileFile containing the keys to load. It should follow the format of OpenSSH's authorized_keys file.
Return values
FileReturns this loader.

Definition at line 57 of file File.php.

Referenced by fpoirotte\Pssht\KeyStoreLoader\File\loadBulk().

fpoirotte\Pssht\KeyStoreLoader\File::loadBulk ( array  $bulk)

Bulk-load keys.

Parameters
array$bulkAn array with information on the keys to load. The keys in the array indicate users while the values contain (an array of) files containing the keys to load.
Return values
FileReturns this loader.

Definition at line 119 of file File.php.

References fpoirotte\Pssht\KeyStoreLoader\File\load().


The documentation for this class was generated from the following file: