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

Class: PEAR_Frontend_Gtk2_Config

Source Location: /PEAR_Frontend_Gtk2-1.1.0/PEAR/Frontend/Gtk2/Config.php

Class Overview


This file contains the configuration options for PEAR_Frontend_Gtk2, beginning with channel colors/images, default channel and more.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 11]
This file contains the configuration options for PEAR_Frontend_Gtk2, beginning with channel colors/images, default channel and more.

It can load and write the config from an .ini file, and from and to the GUI.



[ Top ]


Class Variables

$arChannels = array(
        'pear.php.net'  => array(
            'background-color'  => '#339900',
            'color'             => '#FFF'
        ),'pecl.php.net'=>array('background-color'=>'#2C1D83','color'=>'#FFF'),'pear.chiaraquartet.net'=>array('background-color'=>'#333333','color'=>'#FFF'),'tradebit.bogo'=>array('background-color'=>'#FFF','color'=>'#000'),'gnope.org'=>array('background-color'=>'#FFF','color'=>'#000'),'gnope.bogo'=>array('background-color'=>'#FFF','color'=>'#000'),'default'=>array('background-color'=>'#FFF','color'=>'#000'))

[line 25]

Color settings for the different channels.

When a channel is selected from the dropdown, this array is read and the background color as well as the text color of the bar on the right top is is set according to this settings here.

If there is no entry for a specific channel, the settings in "default" are used.

  • Access: public

Type:   array


[ Top ]

$arDepWidgets = array(
        'onlyreqdeps' => 'mnuOptDepsReq',
        'alldeps'     => 'mnuOptDepsAll',
        'nodeps'      => 'mnuOptDepsNo',
        ''            => 'mnuOptDepNothing'
    )

[line 93]

The dependency options for installation, and the corresponding widget names from the GUI.
  • Access: protected

Type:   array


[ Top ]

$bForceInstall =  false

[line 78]

Force installation?
  • Access: public

Type:   boolean


[ Top ]

$bWorkOffline =  false

[line 72]

Work offline? If yes, then no internet connection is established.
  • Access: public

Type:   boolean


[ Top ]

$strDefaultChannel =  'gnope.org'

[line 60]

The channel which is shown first.
  • Access: public

Type:   string


[ Top ]

$strDefaultPackage =  null

[line 66]

The package which is selected first.
  • Access: public

Type:   string


[ Top ]

$strDepOptions =  'onlyreqdeps'

[line 86]

What dependency option should be used when installing a package.

One of: onlyreqdeps, alldeps, nodeps or "".

  • Access: public

Type:   string


[ Top ]



Method Detail

getConfigArray   [line 264]

array getConfigArray( )

The config array with all current values.

Used for loading and storing

  • Return: Arra with all the config options: option name => option value
  • Access: public

[ Top ]

getConfigFilePath   [line 280]

string getConfigFilePath( )

The config file path. (Where the config file is/shall be stored)
  • Return: The config file path
  • Access: protected

[ Top ]

getInstallOptionString   [line 326]

void getInstallOptionString( )

  • Access: public

[ Top ]

loadCommandLineArguments   [line 145]

void loadCommandLineArguments( )

Loads some command line arguments into the config.

Args are: * -c channelname Select channelname * -O Work offline * -a All dependencies * -f Force installation * -o Only required dependencies * -n No dependencies * -v Version information

  • Access: protected

[ Top ]

loadConfig   [line 107]

boolean loadConfig( )

Load the config file into the variables here.
  • Return: True if all is ok, false if not
  • Access: public

[ Top ]

loadConfigurationFromGui   [line 313]

void loadConfigurationFromGui( PEAR_Frontend_Gtk2 $fe)

Loads the configuration from the GUI to this config.

This needs to be done before saving the config file. It checks the widgets responsible for the config options and reads their settings, saving them intho this config class.

  • Access: public

Parameters:

PEAR_Frontend_Gtk2   $fe   —  The current frontend to where the config shall be transferred

[ Top ]

loadCurrentConfigIntoGui   [line 294]

void loadCurrentConfigIntoGui( PEAR_Frontend_Gtk2 $fe)

Loads the current configuration into the GUI.

Sets all the widgets which reflect the config settings in a way (e.g. the radio menu group for dep options)

  • Access: public

Parameters:

PEAR_Frontend_Gtk2   $fe   —  The current frontend to where the config shall be transferred

[ Top ]

saveConfig   [line 242]

void saveConfig( )

Save the config in the config file
  • Access: public

[ Top ]


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