PEAR_PackageFileManager_Frontend
[ class tree: PEAR_PackageFileManager_Frontend ] [ index: PEAR_PackageFileManager_Frontend ] [ all elements ]

Class: PEAR_PackageFileManager_Frontend

Source Location: /PEAR_PackageFileManager_Frontend-0.8.0/PEAR/PackageFileManager/Frontend.php

Class Overview


Singleton-based frontend for user input/output.


Author(s):

Version:

  • Release: 0.8.0

Copyright:

  • 2005-2006 Laurent Laville

Variables

Methods


Child classes:

PEAR_PackageFileManager_Frontend_Decorator
Decorates any PEAR_PackageFileManager_Frontend class

Inherited Variables

Inherited Methods


Class Details

[line 90]
Singleton-based frontend for user input/output.

This package is designed to be a backend to different front ends written for the PEAR_PackageFileManager2 class. For example, this package can be used to drive a PHP-GTK2 or web front end.



[ Top ]


Class Variables

$driver =

[line 99]

Name of the frontend (driver), used to store the values in session
  • Since: 0.1.0
  • Access: public

Type:   string


[ Top ]

$packagedirectory =

[line 106]

  • Since: 0.1.0
  • Access: public

Type:   string


[ Top ]

$pathtopackagefile =

[line 113]

  • Since: 0.1.0
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 155]

PEAR_PackageFileManager_Frontend __construct( string $driver, mixed $packagedirectory, mixed $pathtopackagefile)

ZE1 class constructor
  • Since: 0.1.0
  • Access: public

Overridden in child classes as:

PEAR_PackageFileManager_Frontend_Decorator::__construct()
Decorator constructor

Parameters:

string   $driver   —  Name of the frontend (Web, Gtk2)
mixed   $packagedirectory   —  Path to the base directory of the package
mixed   $pathtopackagefile   —  Path to an existing package file to read in

[ Top ]

addMaintainer   [line 573]

TRUE addMaintainer( $role, string $handle, $name, $email, [ $active = 'yes'])

Wrapper for method PEAR_PackageFile_v2_rw::deleteMaintainer()
  • Return: on success, FALSE on error
  • See: PEAR_PackageFile_v2_rw::deleteMaintainer()
  • Since: 0.2.0
  • Access: public

Parameters:

string   $handle   —  handle of user to remove from package
   $role   — 
   $name   — 
   $email   — 
   $active   — 

[ Top ]

array_merge_recursive   [line 1669]

array array_merge_recursive( array $paArray1, array $paArray2)

array_merge_recursive()

Similar to array_merge_recursive but keyed-valued are always overwritten. Priority goes to the 2nd array.


Parameters:

array   $paArray1   — 
array   $paArray2   — 

[ Top ]

buildPackageFile   [line 1569]

mixed buildPackageFile( $debug, $changelogOldToNew, $simpleOutput)

  • Since: 0.1.0
  • Access: public

Parameters:

   $debug   — 
   $changelogOldToNew   — 
   $simpleOutput   — 

[ Top ]

container   [line 511]

array container( [bool $reset = false])

Returns a reference to a session variable containing the form-page values and pages' validation status.
  • Since: 0.1.0
  • Access: public

Parameters:

bool   $reset   —  If true, then reset the container: clear all default, constant and submitted values

[ Top ]

deleteMaintainer   [line 600]

TRUE deleteMaintainer( string $handle)

Wrapper for method PEAR_PackageFile_v2_rw::deleteMaintainer()
  • Return: on success, FALSE on error
  • See: PEAR_PackageFile_v2_rw::deleteMaintainer()
  • Since: 0.2.0
  • Access: public

Parameters:

string   $handle   —  handle of user to remove from package

[ Top ]

exportValue   [line 1316]

mixed exportValue( string $pageName, string $elementName)

Returns the element's value
  • Return: value for the element
  • Since: 0.2.0
  • Access: public

Parameters:

string   $pageName   —  name of the page
string   $elementName   —  name of the element in the page

[ Top ]

getDefaults   [line 841]

mixed getDefaults( string $type)

Returns default values of a package (imported or pre-set)
  • Since: 0.1.0
  • Access: public

Parameters:

string   $type   —  category of data

[ Top ]

getDepList   [line 738]

array getDepList( [boolean $default = false])

Returns list of package dependencies (other packages and/or extensions)
  • Since: 0.1.0
  • Access: public

Overridden in child classes as:

PEAR_PackageFileManager_Frontend_Decorator::getDepList()
Decorator::getDepList()

Parameters:

boolean   $default   —  if we get initial data set at first run

[ Top ]

getErrors   [line 437]

array getErrors( [bool $purge = false])

Get a list of all errors since last purge
  • Since: 0.1.0
  • Access: public

Parameters:

bool   $purge   —  set in order to empty the error stack

[ Top ]

getExceptionList   [line 826]

array getExceptionList( )

Returns list of file role for specific files
  • Since: 0.1.0
  • Access: public

Overridden in child classes as:

PEAR_PackageFileManager_Frontend_Decorator::getExceptionList()
Decorator::getExceptionList()

[ Top ]

getFileList   [line 627]

array getFileList( [boolean $default = false], [boolean $ignore = false], [string $plugin = 'file'])

Prepare file list, with role, replacements and platform exception info.
  • Since: 0.1.0
  • Access: public

Overridden in child classes as:

PEAR_PackageFileManager_Frontend_Decorator::getFileList()
Decorator::getFileList()

Parameters:

boolean   $default   —  if we get initial data set at first run
boolean   $ignore   —  Either if you want all files or just ignored
string   $plugin   —  PEAR_PackageFileManager filelist generator

[ Top ]

getMaintList   [line 533]

mixed getMaintList( [string $users = null])

Returns list of package maintainers
  • Return: false on error or if maintainers does not exists, array otherwise
  • Since: 0.1.0
  • Access: public

Overridden in child classes as:

PEAR_PackageFileManager_Frontend_Decorator::getMaintList()
Decorator::getMaintList()

Parameters:

string   $users   —  maintainer category

[ Top ]

getOption   [line 378]

mixed getOption( string $option)

Returns the value of an option from the configuration array.
  • Return: the option value or false on failure
  • Since: 0.1.0
  • Access: public

Parameters:

string   $option   —  option name

[ Top ]

getPageName   [line 1329]

string getPageName( string $pageId)

  • Since: 0.2.0
  • Access: public

Parameters:

string   $pageId   —  page identifier

[ Top ]

getPreferences   [line 365]

TRUE getPreferences( array $options)

Get all user preferences for this frontend
  • Return: on success, FALSE on error
  • Since: 0.3.0
  • Access: public

Parameters:

array   $options   —  Options for config container

[ Top ]

getRoleList   [line 761]

array getRoleList( [boolean $default = false])

Returns list of directories and file extensions roles
  • Since: 0.1.0
  • Access: public

Parameters:

boolean   $default   —  if we get initial data set at first run

[ Top ]

hasErrors   [line 424]

boolean hasErrors( [string $level = false])

Returns whether or not errors have occurred (and been captured).
  • Since: 0.1.0
  • Access: public

Parameters:

string   $level   —  Level name to check for a particular severity

[ Top ]

loadPreferences   [line 243]

TRUE loadPreferences( mixed $config)

Load the user preferences for this frontend
  • Return: on success, FALSE on error
  • Since: 0.1.0
  • Access: public

Parameters:

mixed   $config   —  a PEAR::Config container or an identification array

[ Top ]

log   [line 490]

void log( string $level, string $message)

Log an error using PEAR::Log or compatible backend
  • Since: 0.1.0
  • Access: public

Parameters:

string   $level   —  Error level
string   $message   —  Error message

[ Top ]

multi_array_search   [line 1709]

void multi_array_search( $search_value, $the_array)

Multi-Dimensional Array Search

  1.    <?php
  2.    $foo[1]['a']['xx''bar 1';
  3.    $foo[1]['b']['xx''bar 2';
  4.    $foo[2]['a']['bb''bar 3';
  5.    $foo[2]['a']['yy''bar 4';
  6.    $foo['info'][1'bar 5';
  7.  
  8.    $result multi_array_search('bar 3'$foo);
  9.    print_r($result);
  10.    ?>
   Output:
   Array
   (
        [0] => 2
        [1] => a
        [2] => bb
   )


Parameters:

   $search_value   — 
   $the_array   — 

[ Top ]

preparePackageFile   [line 1341]

mixed preparePackageFile( )

  • Since: 0.1.0
  • Access: public

[ Top ]

pushWarning   [line 1613]

void pushWarning( object $err)

Push a warning or error to the warning stack.
  • Since: 0.1.0
  • Access: public

Parameters:

object   $err   —  PEAR_Error instance

[ Top ]

realpathnix   [line 1637]

void realpathnix( $path)

  • Since: 0.1.0
  • Access: public

Parameters:

   $path   — 

[ Top ]

repackagePEAR_Error   [line 451]

void repackagePEAR_Error( object $error)

Repackage PEAR error
  • Author: Ian Eure <ieure@php.net> from StackThunk 0.9.0
  • Since: 0.1.0
  • Access: public

Parameters:

object   $error   —  PEAR_Error object to repackage

[ Top ]

run   [line 1627]

void run( )

Processes the request.
  • Abstract:
  • Since: 0.1.0
  • Access: public

[ Top ]

savePreferences   [line 334]

TRUE savePreferences( mixed $target, string $type, [array $options = null])

Save the user preferences for this frontend
  • Return: on success, FALSE on error
  • Since: 0.1.0
  • Access: public

Parameters:

mixed   $target   —  Datasource to write to
string   $type   —  Type of configuration
array   $options   —  Options for config container

[ Top ]

setDefaults   [line 879]

void setDefaults( string $type, [ $values = null], [boolean $overwrite = false])

Sets default values used when we click on 'Reset' button of the frontend
  • Since: 0.2.0
  • Access: public

Parameters:

string   $type   —  category of data
boolean   $overwrite   —  allow to define a new copy of default values
   $values   — 

[ Top ]

setFileList   [line 686]

void setFileList( string $plugin)

Defines a listing of every file in package directory and all subdirectories.
  • Since: 0.1.0
  • Access: public

Overridden in child classes as:

PEAR_PackageFileManager_Frontend_Decorator::setFileList()
Decorator::setFileList()

Parameters:

string   $plugin   —  PEAR_PackageFileManager filelist generator

[ Top ]

setLogger   [line 219]

TRUE setLogger( mixed $logger)

Set up a PEAR::Log object or compatible for this frontend
  • Return: on success, FALSE on error
  • Since: 0.1.0
  • Access: public

Parameters:

mixed   $logger   —  PEAR::Log or compatible instance

[ Top ]

setOption   [line 401]

bool setOption( string $option, mixed $value)

Sets an option after the configuration array has been loaded.
  • Return: true on success or false on failure
  • Since: 0.1.0
  • Access: public

Parameters:

string   $option   —  option name
mixed   $value   —  value for the option

[ Top ]

singleton   [line 175]

PEAR_PackageFileManager_Frontend_{$driver} singleton( [string $driver = ''], [mixed $packagedirectory = false], [mixed $pathtopackagefile = false], [mixed $logger = false])

Creates a unique instance of the given front end class.
  • Since: 0.1.0
  • Access: public

Parameters:

string   $driver   —  Name of the frontend (Web, Gtk2)
mixed   $packagedirectory   —  Path to the base directory of the package
mixed   $pathtopackagefile   —  Path to an existing package file to read in
mixed   $logger   —  PEAR::Log or compatible instance

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:46:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.