Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Ftp
  • Server
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Ftp

FTP wrapper for DiRete\microftps

Namespace: Blesta\Core\Util\Ftp
Located at core/Util/Ftp/Ftp.php
Methods summary
public
# __construct( string $server = '', string $username = '', string $password = '', array $options = [] )

Parameters

$server
The IP/domain of the server to connent to
$username
The username to connect with
$password
The password to connect with
$options

The options to use for the connection including:

  • passive
  • port
  • timeout
  • curlOptions
public
# connect( )

Attempts to connect to the FTP server

Attempts to connect to the FTP server

public
# setServer( type $server )

Sets the FTP server URL to connect to

Sets the FTP server URL to connect to

Parameters

$server
public
# setCredentials( string $username, string $password )

Sets login credentials for the FTP connection

Sets login credentials for the FTP connection

Parameters

$username
The FTP username
$password
The FTP password
public
# setOptions( array $options )

Sets options to use for the FTP connection

Sets options to use for the FTP connection

Parameters

$options

The options to use for the connection including:

  • passive
  • port
  • timeout
  • curlOptions
public mixed
# read( string $path )

Reads the file from the remote system

Reads the file from the remote system

Parameters

$path
The path to read the file from the server

Returns

mixed
The result

Throws

Exception
public mixed
# write( string $from_path, string $to_path )

Writes the file from the local system to the remote system

Writes the file from the local system to the remote system

Parameters

$from_path
The path to the local file
$to_path
The path to write the file to on the server

Returns

mixed
The result

Throws

Exception
public mixed
# delete( string $path )

Deletes the remote file at the given path

Deletes the remote file at the given path

Parameters

$path
The path to delete the file from the server

Returns

mixed
The result

Throws

Exception
public array
# listDir( string $dir )

List directory

List directory

Parameters

$dir
Directory to list

Returns

array

Throws

Exception
Constants summary
string CONNECTION_ERROR
# 'Could not connect to FTP server.'
Blesta API documentation generated by ApiGen