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

Class: System_Daemon_Options

Source Location: /System_Daemon-0.5.0/System/Daemon/Options.php

Class Overview


Mechanism for validating, getting and setting a predefined set of options.


Author(s):

Version:

  • SVN: Release: $Id: Options.php 150 2008-09-05 22:06:05Z kevin $

Copyright:

  • 2008 Kevin van Zonneveld (http://kevin.vanzonneveld.net)

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 29]
Mechanism for validating, getting and setting a predefined set of options.


[ Top ]


Class Variables

$errors = array()

[line 57]

Holds errors
  • Access: public

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 65]

System_Daemon_Options __construct( array $definitions)

Constructor
  • Access: public

Parameters:

array   $definitions   —  The predefined option definitions

[ Top ]

getOption   [line 81]

boolean getOption( string $name)

Retrieves any option found in $_definitions
  • Access: public

Parameters:

string   $name   —  Name of the Option

[ Top ]

getOptions   [line 94]

array getOptions( )

Gets an array of options found in $_definitions
  • Access: public

[ Top ]

init   [line 157]

mixed init( [boolean $premature = false])

Checks if all the required options are set & met.

Initializes, sanitizes & defaults unset variables

  • Return: integer or boolean
  • Access: public

Parameters:

boolean   $premature   —  Whether to do a premature option init

[ Top ]

isInitialized   [line 144]

boolean isInitialized( )

Wether options are initialized
  • Access: public

[ Top ]

setOption   [line 107]

boolean setOption( string $name, mixed $value)

Sets any option found in $_definitions
  • Access: public

Parameters:

string   $name   —  Name of the Option
mixed   $value   —  Value of the Option

[ Top ]

setOptions   [line 128]

boolean setOptions( array $use_options)

Sets an array of options found in $_definitions
  • Access: public

Parameters:

array   $use_options   —  Array with Options

[ Top ]

strIsUnix   [line 497]

boolean strIsUnix( string $str)

Check if a string has a unix proof format (stripped spaces, special chars, etc)
  • Access: protected

Parameters:

string   $str   —  What string to test for unix compliance

[ Top ]

strToUnix   [line 510]

string strToUnix( string $str)

Convert a string to a unix proof format (strip spaces, special chars, etc)
  • Access: protected

Parameters:

string   $str   —  What string to make unix compliant

[ Top ]


Documentation generated on Thu, 10 Dec 2015 05:50:59 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.