Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Config Class Reference
Inheritance diagram for Config:
MySource_Object Apache_Config Context_Config External_Tools_Config HIPO_Config Messaging_Service_Config Password_Rules_Config Proxy_Authentication_Config Squiz_Server_Config System_Asset_Config System_Config

Public Member Functions

 __construct ()
 
 save ($vars, $backup_existing=FALSE, $send_message=TRUE)
 
 acquireLock ()
 
 canAcquireLock ()
 
 releaseLock ()
 
 updateLock ()
 
 getLockInfo ()
 
 writeAccess ()
 
 paintBackend (&$o)
 
 processBackend (&$o)
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

 $config_vars = Array()
 
 $config_file = ''
 
 $name = ''
 
- Data Fields inherited from MySource_Object
 $_tmp
 

Protected Member Functions

 _paintConfigVar ($var_name, $value, $var_export=TRUE)
 

Detailed Description

Definition at line 29 of file config.inc.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 57 of file config.inc.

Member Function Documentation

_paintConfigVar (   $var_name,
  $value,
  $var_export = TRUE 
)
protected

Paints the code to define a constant

This allows extra things to be added for special cases, and extra checks to be made if necessary on the value

Parameters
string$namethe config var name
mixed$valuethe value that the config var has
boolean$var_exportwhether to run the value through var_export or not
Returns
boolean whether the value is valid or not

Definition at line 181 of file config.inc.

acquireLock ( )

Attempt to acquire the lock for this config

Returns true on success or the error message on failure

Returns
mixed boolean|string
See Also
MySource::acquireLock()

Definition at line 205 of file config.inc.

canAcquireLock ( )

Whether the current user can acquire the lock

Returns
boolean
See Also
MySource::acquireLock()

Definition at line 221 of file config.inc.

getLockInfo ( )

Returns an array of information about any lock we have

Returns
Array() public
See Also
MySource::getLockInfo()

Definition at line 265 of file config.inc.

paintBackend ( $o)

Paints the interface for our config options.

If you (as a sub-class) put your config vars so that when they are submitted appear in $_POST[get_class($this)] then you probably won't need to override processBackend()

Parameters
objectBackend_Outputter &$o reference to the backend outputter
Returns
void public
See Also
processBackend()

Definition at line 306 of file config.inc.

processBackend ( $o)

Saves the config settings that were submitted

Parameters
objectBackend_Outputter &$o reference to the backend outputter
Returns
boolean public
See Also
paintBackend()

Definition at line 394 of file config.inc.

releaseLock ( )

Attempt to release the lock for this config

Returns true on success or the error message on failure

Returns
mixed boolean|string
See Also
MySource::releaseLock()

Definition at line 236 of file config.inc.

save (   $vars,
  $backup_existing = FALSE,
  $send_message = TRUE 
)

Rewrites the conf file with current variables

Parameters
Array$varsthe array with any new values (that are allowed to be edited) Array('[config_var_name]' => [scalar value])
boolean$backup_existingwhether we should backup the existing config file first
boolean$send_messagewhether to send a message using the messaging system
Returns
boolean indicates whether the file was written public

Definition at line 76 of file config.inc.

updateLock ( )

Refreshes the lock on a config screen

Returns true on success or error message on fail

Returns
mixed boolean|string
See Also
MySource::updateLock();

Definition at line 251 of file config.inc.

writeAccess ( )

Does the current user have writeAccess() to this config ?

Returns
boolean public

Definition at line 278 of file config.inc.


The documentation for this class was generated from the following file: