phpDocumentor webinstall
[ class tree: webinstall ] [ index: webinstall ] [ all elements ]

Class: phpInstaller

Source Location: /engine.inc.php

Class phpInstaller

Property Summary
string   $appDescription   Optional Applactation Description
string   $appId   Short applactation name, with no spaces
string   $appName   Applactation Name
string   $appVersion   Optional Applactation Version
bool   $compress   Compress the installer
array   $compresstypes   List of decompression methods available
string   $dataDir   Engene Path
array   $download   List of compressed files to download from the web
string   $fileData   Extra files to include in installer
array   $files   File names used
array   $ignore   Files to ignore
string   $pageData   installerPageData
array   $pageHidden   installer forms
int   $pageID   installerPageData
array   $vfsDir   Virtual File System Folders/Directories
array   $vfsFiles   Virtual File System Files
int   $vfsSize   Total size being packed
array   $vfsSizes   Virtual File System Sizes

[ Top ]
Method Summary
bool   addCompressionMethod()   Add a decompression method to use
void   addInstallerPages()   Add the file-copying steps to the installer
bool   addMetaFile()   Add a file to the installer.
int   addPage()   add a page to the installer
void   addPath()   Add a directory of files to the installer
bool   addPathDownload()   Add a path that the user downloads
bool   addWriteMethod()   Add a method of creating files for example, over FTP, ect.
void   dataDir()   set the engine data directory
string   file()   Get a name of a resource file to be used
void   generate()   Generate the installer file
void   generateTarGz()   Generate a tar/tgz/bz file If you define $installer, this function will also put in the archive a file (si)
bool   ignored_file()   is this an ignored file?
void   message()   Send a message to the installer console.
str   stripPath()   strip extra slashes out of a file path
str   valid_chars()   strip invalid chars from a string
void   _add_file()   Add a file or directory to installer Use addFile() instead (it uses this)
str   _get_name_from_str()   Compound a filename from a sentence

[ Top ]
Properties
string   $appDescription [line 27]

Optional Applactation Description

Displayed on first page

API Tags:
Access:  public


[ Top ]
string   $appId = '' [line 33]

Short applactation name, with no spaces

for use in file names

API Tags:
Access:  public


[ Top ]
string   $appName = '' [line 16]

Applactation Name

API Tags:
Access:  public


[ Top ]
string   $appVersion [line 21]

Optional Applactation Version

API Tags:
Access:  public


[ Top ]
bool   $compress = true [line 107]

Compress the installer

API Tags:
Access:  public


[ Top ]
array   $compresstypes = array('zip','tar','tgz') [line 102]

List of decompression methods available

API Tags:
Static:  


[ Top ]
string   $dataDir = '' [line 39]

Engene Path

use $this->dataDir($path) to set

API Tags:
Access:  protected


[ Top ]
array   $download = array() [line 97]

List of compressed files to download from the web

API Tags:
Access:  protected


[ Top ]
string   $fileData = '' [line 92]

Extra files to include in installer

bring them up with installer.php?f=NAME add a file with the phpInstaller::addMetaFile method

API Tags:
Access:  protected


[ Top ]
array   $files = array(
'installerdata'=>'installer_data.inc',
'installpath'=>'step_path.inc',
'aboutto'=>'step_aboutto.inc',
'installer'=>'step_installer.inc',
'finished'=>'step_finished.inc'
)
[line 44]

File names used

API Tags:
Access:  public


[ Top ]
array   $ignore = array() [line 113]

Files to ignore

if file contains any value in array

API Tags:
Access:  public


[ Top ]
string   $pageData = '' [line 75]

installerPageData

API Tags:
Access:  protected


[ Top ]
array   $pageHidden = array() [line 85]

installer forms

API Tags:
Access:  protected


[ Top ]
int   $pageID = 1 [line 80]

installerPageData

API Tags:
Access:  protected


[ Top ]
array   $vfsDir = array() [line 55]

Virtual File System Folders/Directories

API Tags:
Access:  protected


[ Top ]
array   $vfsFiles = array() [line 60]

Virtual File System Files

API Tags:
Access:  protected


[ Top ]
int   $vfsSize = 0 [line 70]

Total size being packed

API Tags:
Access:  protected


[ Top ]
array   $vfsSizes = array() [line 65]

Virtual File System Sizes

API Tags:
Access:  protected


[ Top ]
Methods
addCompressionMethod  [line 173]

  bool addCompressionMethod( str $method  )

Add a decompression method to use

file "write.$method.inc" must exist in data directory called automaticly by addPathDownload()

Parameters:
str   $method: 


[ Top ]
addInstallerPages  [line 307]

  void addInstallerPages( )

Add the file-copying steps to the installer



[ Top ]
addMetaFile  [line 284]

  bool addMetaFile( str $name, str $filePath, str $contentType, [array $replace = array()]  )

Add a file to the installer.

Access it like this: installer.php?file=NAME

Parameters:
str   $name: 
str   $filePath: 
str   $contentType: 
array   $replace: 


[ Top ]
addPage  [line 547]

  int addPage( str $title, str $content, [array $fields = array()], [array $buttons = array()]  )

add a page to the installer

Parameters:
str   $title:  Title of the page
str   $content:  PHP content
array   $fields:  list of input fields to use
array   $buttons:  status of buttons array('next'=>bool,'back'=>bool,'disabled'=>bool)

API Tags:
Return:  Page ID


[ Top ]
addPath  [line 141]

  void addPath( str $path, [str $to = '/']  )

Add a directory of files to the installer

Parameters:
str   $path:  file/directory to read from
str   $to:  path to extract to in installer


[ Top ]
addPathDownload  [line 153]

  bool addPathDownload( str $url, [str $to = '/'], [str $type = 'zip'], [mixed $required = false]  )

Add a path that the user downloads

Parameters:
str   $url:  Download URL
str   $to:  path to extract to
str   $type:  file type/extraction method to use


[ Top ]
addWriteMethod  [line 191]

  bool addWriteMethod( str $method  )

Add a method of creating files for example, over FTP, ect.

the file method is enabled by default

Parameters:
str   $method:  file "write.$method.inc" must exist in data directory


[ Top ]
dataDir  [line 582]

  void dataDir( str $path  )

set the engine data directory

Parameters:
str   $path:  File path


[ Top ]
file  [line 129]

  string file( string $name  )

Get a name of a resource file to be used

Parameters:
string   $name: 

API Tags:
Return:  file contents
Access:  protected


[ Top ]
generate  [line 328]

  void generate( [str $output = 'installer.php']  )

Generate the installer file

Parameters:
str   $output:  Path to write file


[ Top ]
generateTarGz  [line 515]

  void generateTarGz( unknown_type $file, [unknown_type $format = 'gz'], [bool $installer = null]  )

Generate a tar/tgz/bz file If you define $installer, this function will also put in the archive a file (si)

Parameters:
unknown_type   $file: 
unknown_type   $format: 
bool   $installer:  filename for an instaler file


[ Top ]
ignored_file  [line 205]

  bool ignored_file( str $fname  )

is this an ignored file?

Parameters:
str   $fname:  file name

API Tags:
Return:  true for ignored, false to include
Access:  protected


[ Top ]
message  [line 523]

  void message( str $message, [int $state = 0]  )

Send a message to the installer console.

Parameters:
str   $message: 
int   $state:  prints short sucess/fail message after message


[ Top ]
stripPath  [line 590]

  str stripPath( str $path  )

strip extra slashes out of a file path

Parameters:
str   $path: 


[ Top ]
valid_chars  [line 489]

  str valid_chars( str $str, [array $valid = null]  )

strip invalid chars from a string

Parameters:
str   $str:  Input string
array   $valid:  array of okay characters, defaults to these: a-z A-z 0-9 _

API Tags:
Return:  stripped string


[ Top ]
_add_file  [line 225]

  void _add_file( mixed $from, str $to, [bool $output = true], str $base  )

Add a file or directory to installer Use addFile() instead (it uses this)

Parameters:
str   $base:  main directory to read from
str   $to:  directory in installer to write to
bool   $output: 

API Tags:
Access:  protected


[ Top ]
_get_name_from_str  [line 259]

  str _get_name_from_str( str $name, int $length  )

Compound a filename from a sentence

Parameters:
str   $name:  Input
int   $length:  max length of output


[ Top ]

Documentation generated on Tue, 05 Sep 2006 22:32:40 -0600 by phpDocumentor 1.3.0RC4