Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • Download

Class Download

Download component

Simplifies the file download/stream process by setting the appropriate headers

Package: blesta\components\download
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/download/download.php

Methods summary

public
# __construct( mixed $encoding = "binary" )

Initializes the Download object, sets the default encoding

Initializes the Download object, sets the default encoding

public
# setEncoding( string $encoding )

Overrides the currently set file encoding

Overrides the currently set file encoding

Parameters

$encoding
string
$encoding The file encoding to set for all subsequent streams or downloads
public
# setContentType( mixed $content_type )

Overrides the currently set Content Type for this file

Overrides the currently set Content Type for this file

Parameters

$content_type
mixed
$content_type A numerically indexed array of content types to set, or a string containing the content type to set
public
# streamFile( string $file, string $file_name = null, string $send_mode = "file" )

Streams a file out to the standard output stream (e.g. a browser)

Streams a file out to the standard output stream (e.g. a browser)

Parameters

$file
string
$file The full path to the file name to be streamed
$file_name
string
$file_name The name to give the file being streamed (defaults to the real file name)
$send_mode
string
$send_mode The send mode for the file (file to send normally, xsendfile to send through mod_xsendfile)
public
# streamData( string $file_name, string $data )

Streams the given data to the standard output stream (e.g. a browser)

Streams the given data to the standard output stream (e.g. a browser)

Parameters

$file_name
string
$file_name The name of the file to be streamed
$data
string
$data The data to be streamed
public
# downloadFile( string $file, string $file_name = null, string $send_mode = "file" )

Forces download of a file

Forces download of a file

Parameters

$file
string
$file The full path to the file name to be downloaded
$file_name
string
$file_name The name to give the file being downloaded (defaults to the real file name)
$send_mode
string
$send_mode The send mode for the file (file to send normally, xsendfile to send through mod_xsendfile)
public
# downloadData( string $file_name, string $data )

Forces download of the given data

Forces download of the given data

Parameters

$file_name
string
$file_name The name of the file to be downloaded
$data
string
$data The data to be downloaded

Magic methods summary

Blesta API documentation generated by ApiGen 2.8.0