bool copyFile(
string
$source_name, [string
$output_name = 0]
)
|
|
Copy a file from the module location to the temporary directory.
If the second argument is provided then the file will be saved under the name taken form this argument. If only one parameter is given, source and destination filenames are the same
Parameters:
string |
$source_name: |
The source file name |
string |
$output_name: |
The destination file name |
API Tags:
Return: | result of the copy operation |
Access: | protected |
Information Tags:
Final: | not to be redefined |
void dumpAttibutes(
string
$file
)
|
|
dumps attributes for debugging purposes
dumpAttibutes method is supplied for debuging purposes, it simply dumps the attribute array to a file with name passed in the attribute.
Parameters:
string |
$file: |
the output file name |
API Tags:
array saveCertificateFiles(
string
$format
)
|
|
Save certificate files in either DER or PEM format
Certificate files will be saved in the module working directory.
Parameters:
string |
$format: |
only "der" and "pem" are currently allowed |
API Tags:
Return: | an array of saved certificate file names or FALSE on error |
Access: | protected |
Set up working environment for a device module
Sets up the device module environment taking into account the actual profile selected by the user in the GUI. The selected profile is passed as the Profile $profile argumant.
This method needs to be called inside of the Device::writeInstaller method.
setup performs the following tasks:
- collect profile attributes and pass them as the attributes property;
- create the temporary working directory
- process CA certificates and store them as 'internal:CAs' attribute
- process and save optional info files and store references to them in
'internal:info_file' attribute
Parameters:
Profile |
$profile: |
the profile object which will be passed by writeInstaller. |
API Tags:
Information Tags:
Final: | not to be redefined |
void translateFile(
string
$source_name, [string
$output_name = 0], [int
$use_win_cp = 0]
)
|
|
Copy a file from the module location to the temporary directory aplying translation.
If the second argument is provided and is not equal to 0, then the file will be saved under the name taken form this argument. If only one parameter is given or the second is equal to 0, source and destination filenames are the same. The third optional parameter, if nonzero, will add changing the charset to one of old Windows charsets. This is required by the Windows installer and is expected to go away in the future.
Parameters:
string |
$source_name: |
The source file name |
string |
$output_name: |
The destination file name |
int |
$use_win_cp: |
Set Windows charset if non-zero |
API Tags:
Information Tags:
Final: | not to be redefined |
void writeInstaller(
$profile
)
|
|
placeholder for the main device method
writeInstaller method needs to be redefined in every device module class the one below is just an example writeInstaller must call the setup method passing to it the $profile argument.
Parameters:
Profile |
$profile: |
the profile object which will be passed by caller. |
API Tags:
Redefined in descendants as: