Device_TestModule __construct(
string
$device
)
|
|
Constructs a Device object.
It is CRUTCIAL that the constructor sets $this->supportedEapMethods to an array of methods available for the particular device.
Parameters:
string |
$device: |
a pointer to a device module, which must be an index of one of the devices defined in the Devices array in devices.php. |
API Tags:
Information Tags:
Final: | not to be redefined |
void writeInstaller(
$profile
)
|
|
prepare a zip archive containing files and settings which normally would be used inside the module to produce an installer
/* run innitial setup
this will:
- create the temporary directory and save its path as $this->FPATH
- process the CA certificates and store results in $this->attributes['internal:CAs'][0]
$this->attributes['internal:CAs'][0] is an array of processed CA certificates
a processed certifincate is an array
'pem' points to pem feromat certificate
'der' points to der format certificate
'md5' points to md5 fingerprint
'sha1' points to sha1 fingerprint
'name' points to the certificate subject
- save the info_file (if exists) and put the name in $this->attributes['internal:info_file_name'][0]
*/
debug(4,"Test Module Installer start\n");
// create certificate files and save their names in $CA_files arrary
// tkip-profile is currently used only by Windows
// $tkip_profile_name = 'eduroam (TKIP)';
// copy a fixed file from the module Files directory
debug(2, "copying of Module.howto failed\n");
// copy a fixed file from the module Files directory and saveunde a different name
if( ! $this->copyFile('test_file','copied_test_file'))
debug(2, "copying of Module.howto to copied_test_file failed\n");
return($installer_path);
}
Parameters:
API Tags:
Redefinition of:
- DeviceConfig::writeInstaller()
- placeholder for the main device method
void zipInstaller(
$attr
)
|
|
zip files and return the archive name
inline
$e =
preg_replace('/ +/','_',$attr['internal:inst_name'][0]).
'.zip';
$o =
system('zip -q '.
$e.
' *');
return $e;
}
return string
Parameters:
API Tags: