management_pack_management_class Class Reference

Misc functionality to make working with management packs easier Name mostly chosen because it's ridiculous. More...

Public Member Functions

 is_imported ($new_pack)
 Given data representing a "full" management pack (with commands etc), returns: 1 if the pack is already completely imported, and we can ignore it.
 import ($pack_data, $force=false)
 Given data representing a "full" mgmt pack (with commands etc), tries to import.
 export ($pack_name, $description)
 Given the name of a management pack, returns an array representing the "expanded" pack.

Static Public Member Functions

static validate_input ($data)

Detailed Description

Misc functionality to make working with management packs easier Name mostly chosen because it's ridiculous.


Member Function Documentation

management_pack_management_class::export ( pack_name,
description 
)

Given the name of a management pack, returns an array representing the "expanded" pack.

Returns:
an array of data on success, an error string on failure
management_pack_management_class::import ( pack_data,
force = false 
)

Given data representing a "full" mgmt pack (with commands etc), tries to import.

Parameters:
$pack_data The data to import
$force If true, will import even if the user has modified the pack
Returns:
the new object id if the pack was imported, false if we bailed, an object containing validation errors in exceptional cases
management_pack_management_class::is_imported ( new_pack  ) 

Given data representing a "full" management pack (with commands etc), returns: 1 if the pack is already completely imported, and we can ignore it.

0 if the pack is importable, ie not imported at all, or only "simple" fields differs changed. array of error messages if the pack appears modified and we must ask the user to be careful. This is really just the same code over and over, except with minor changes in variable names because everything is a special case.

static management_pack_management_class::validate_input ( data  )  [static]
Exceptions:
Exception with reason

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 14 Jan 2015 for nacoma by  doxygen 1.6.1