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

Class: System_Daemon_OS

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

Class Overview


Operating System focussed functionality.


Author(s):

Version:

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

Copyright:

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

Variables

Methods


Child classes:

A System_Daemon_OS driver for Linux based Operating Systems
A System_Daemon_OS driver for Windows
A System_Daemon_OS driver for BSD

Inherited Variables

Inherited Methods


Class Details

[line 29]
Operating System focussed functionality.


[ Top ]


Class Variables

$autoRunTemplatePath =  ""

[line 45]

Template path
  • Access: protected

Type:   string


[ Top ]

$autoRunTemplateReplace = array()

[line 53]

Replace the following keys with values to convert a template into a read autorun script
  • Access: protected

Type:   array


[ Top ]

$errors = array()

[line 36]

Holds errors
  • Access: public

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 70]

System_Daemon_OS __construct( )

Constructor

Only ran by instantiated OS Drivers

  • Access: public

[ Top ]

factory   [line 96]

object &factory( [mixed $force_os = false], [boolean $retried = false])

Loads all the drivers and returns the one for the most specifc OS
  • Access: public

Parameters:

mixed   $force_os   —  boolean or string when you want to enforce an OS for testing purposes. CAN BE VERY DANGEROUS IF WRONG OS IS SPECIFIED! Will otherwise autodetect OS.
boolean   $retried   —  used internally to find out wether we are retrying

[ Top ]

getAutoRunPath   [line 207]

string getAutoRunPath( string $appName)

Returns OS specific path to autoRun file
  • Access: public

Parameters:

string   $appName   —  Unix-proof name of daemon

[ Top ]

getAutoRunScript   [line 262]

mixed getAutoRunScript( array $properties)

Uses properties to enrich the autuRun Template
  • Return: string or boolean on failure
  • Access: public

Parameters:

array   $properties   —  Contains the daemon properties

[ Top ]

getAutoRunTemplate   [line 240]

unknown getAutoRunTemplate( )

Returns a template to base the autuRun script on.

Uses $autoRunTemplatePath if possible.


[ Top ]

getAutoRunTemplatePath   [line 190]

unknown getAutoRunTemplatePath( )

Returns a template path to base the autuRun script on.

Uses $autoRunTemplatePath if possible.


Overridden in child classes as:

System_Daemon_OS_BSD::getAutoRunTemplatePath()
Returns a template path to base the autuRun script on.

[ Top ]

getDetails   [line 178]

array getDetails( )

Returns array with all the specific details of the loaded OS
  • Access: public

[ Top ]

isInstalled   [line 167]

boolean isInstalled( )

Determines wether the system is compatible with this OS
  • Access: public

Overridden in child classes as:

System_Daemon_OS_Linux::isInstalled()
Determines wether the system is compatible with this OS
System_Daemon_OS_Windows::isInstalled()
Determines wether this system is compatible with this OS
System_Daemon_OS_BSD::isInstalled()
Determines wether the system is compatible with this OS

[ Top ]

writeAutoRun   [line 310]

mixed writeAutoRun( array $properties, [boolean $overwrite = false])

Writes an: 'init.d' script on the filesystem combining

Parameters:

array   $properties   —  Contains the daemon properties
boolean   $overwrite   —  Wether to overwrite when the file exists

[ Top ]


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