pnp_page_class Class Reference
PNP Page objects.
More...
Public Member Functions |
| __construct ($options=array()) |
| assign (array $options) |
| Setup object to conform to the Nacoma standard, see the public variables of object_class for more information.
|
| delete_object () |
| get_cmd_bar_links () |
| Make sure the controller is used instead of the generic delete.php.
|
| get_object_name () |
| save_object ($user=true) |
| Does not write to db, write to file.
|
| write_to_file ($filename) |
| Write current properties to file.
|
Static Public Member Functions |
static | delete_file ($filename) |
static | from_file ($filename) |
| Factory method for translating a file to an object.
|
static | from_id ($id) |
| A page's name (accepts both $name and $name.cfg).
|
static | get_available_graphs () |
| Expensive function, traverses all perfdata directories and collects filenames.
|
static | get_saved_pages () |
Data Fields |
| $properties |
| This object's properties (required vars, allowed values etc).
|
| $type = 'pnp_page' |
| The type name of this object - must be overridden.
|
| $graphs = array() |
| graphs is a service oriented array, [] => [service] => hosts[]
|
const | PERFDATA_DIR = "/opt/monitor/op5/pnp/perfdata/" |
| Location of PNP perfdata.
|
Static Public Attributes |
static | $available_graphs = array() |
| See get_available_graphs.
|
Detailed Description
PNP Page objects.
Constructor & Destructor Documentation
pnp_page_class::__construct |
( |
$ |
options = array() |
) |
|
Member Function Documentation
pnp_page_class::assign |
( |
array $ |
options |
) |
|
Setup object to conform to the Nacoma standard, see the public variables of object_class for more information.
- Parameters:
-
- Returns:
- pnp_page_class
- Exceptions:
-
| RuntimeException | if graphs doesn't exist |
static pnp_page_class::delete_file |
( |
$ |
filename |
) |
[static] |
- Parameters:
-
- Returns:
- boolean
- Exceptions:
-
pnp_page_class::delete_object |
( |
|
) |
|
- Returns:
- boolean
- Exceptions:
-
Reimplemented from object_class.
static pnp_page_class::from_file |
( |
$ |
filename |
) |
[static] |
Factory method for translating a file to an object.
- Parameters:
-
- Returns:
- pnp_page_class
- Exceptions:
-
static pnp_page_class::from_id |
( |
$ |
id |
) |
[static] |
A page's name (accepts both $name and $name.cfg).
- Parameters:
-
- Returns:
- pnp_page_class
- Exceptions:
-
static pnp_page_class::get_available_graphs |
( |
|
) |
[static] |
Expensive function, traverses all perfdata directories and collects filenames.
- Returns:
- array [string host] => [string service] => string filename (full path)
pnp_page_class::get_cmd_bar_links |
( |
|
) |
|
Make sure the controller is used instead of the generic delete.php.
- Returns:
- array
Reimplemented from object_class.
pnp_page_class::get_object_name |
( |
|
) |
|
static pnp_page_class::get_saved_pages |
( |
|
) |
[static] |
pnp_page_class::save_object |
( |
$ |
user = true |
) |
|
Does not write to db, write to file.
- Parameters:
-
- Returns:
- string full path of newly created page
- Exceptions:
-
Reimplemented from object_class.
pnp_page_class::write_to_file |
( |
$ |
filename |
) |
|
Write current properties to file.
- Parameters:
-
- Returns:
- string new filename
- Exceptions:
-
| RuntimeException | couldn't write to given filename |
Field Documentation
pnp_page_class::$properties |
Initial value: array(
'var_index' => array(
'use_regex' => 'pnp_page_use_regex',
'page_name' => 'string',
'host_name' => 'string',
'service_desc' => 'string',
'services' => 'pnp_page_service_mselect'
),
'required' => array(
'use_regex',
'page_name'
),
'label' => array(
'use_regex' => 'Use regex',
'page_name' => 'Page name',
'host_name' => 'Host name',
'service_desc' => 'Service description',
'hosts' => 'Hosts',
'services' => 'Services'
),
'special' => array(
'services' => 'service'
),
'topic' => 'page_name'
)
This object's properties (required vars, allowed values etc).
Reimplemented from object_class.
The documentation for this class was generated from the following file: