Difference between revisions of "JFTP/ construct"
From Joomla! Documentation
< API16:JFTP
(New page: ===Description===
JFTP object constructor
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</spa...) |
m (removing red link to edit, no existant pages) |
||
Line 3: | Line 3: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Syntax=== | ===Syntax=== | ||
Line 60: | Line 60: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Examples=== | ===Examples=== | ||
Line 75: | Line 75: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API16]] |
Revision as of 21:54, 13 May 2013
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
JFTP object constructor
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
__construct($options=array())
Parameter Name | Default Value | Description |
---|---|---|
$options | array() | $options Associative array of options to set |
Defined in[edit]
libraries/joomla/client/ftp.php
Importing[edit]
jimport( 'joomla.client.ftp' );
Source Body[edit]
function __construct($options=array()) {
// If default transfer type is no set, set it to autoascii detect
if (!isset ($options['type'])) {
$options['type'] = FTP_BINARY;
}
$this->setOptions($options);
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$this->_OS = 'WIN';
} elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') {
$this->_OS = 'MAC';
} else {
$this->_OS = 'UNIX';
}
if (FTP_NATIVE) {
// Import the generic buffer stream handler
jimport('joomla.utilities.buffer');
// Autoloading fails for JBuffer as the class is used as a stream handler
JLoader::load('JBuffer');
}
// Register faked "destructor" in PHP4 to close all connections we might have made
if (version_compare(PHP_VERSION, '5') == -1) {
register_shutdown_function(array(&$this, '__destruct'));
}
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
<CodeExamplesForm />