Source for file ConfigElement.php
Documentation is available at ConfigElement.php
* Abstract class for each config elements.
* @copyright 2010, Nippour Geomatik
* @license http://www.geoprisma.org/license BSD License
* @link http://www.geoprisma.org
* Abstract class for each config elements.
* @subpackage ConfigElement
* @license http://www.geoprisma.org/license BSD License
* @link http://www.geoprisma.org
* Return DomElement object of given value.
* @param string $pstrType Type
* @param string $pstrValue Value
* @param DOMDocument $pobjDomDocument DomDocument object used to create
$pstrType, $pstrValue, DOMDocument $pobjDomDocument
// support for org_geoprisma_option_Option values
&&
get_class($pstrValue) ==
"org_geoprisma_option_Option"
$pstrType =
$pstrValue->getName();
$pstrValue =
$pstrValue->getValue();
$strSubType =
substr($pstrType, 0, -
1);
$objDomElement =
$pobjDomDocument->createElement($pstrType);
foreach ($pstrValue as $strArrayKey =>
$strArrayValue)
$strSubType, $strArrayValue, $pobjDomDocument
$strArrayKey, $strArrayValue, $pobjDomDocument
$objDomElement->appendChild($objChildDomElement);
$objDomElement =
$pobjDomDocument->createElement(
* Given an array of records (that were fetched from sql requests, xml to
* array conversion, etc.), validate that the elements are correctly
* @param array $pobjArray The config element array
$pobjArrayMainKeys =
array_keys($pobjArray);
$pobjArrayValues =
$pobjArray[$pobjArrayMainKeys[0]];
if (count($pobjArrayValues) ==
1 &&
is_array($pobjArrayValues))
$objArrayKeys =
array_keys($pobjArrayValues);
if (!is_int($objArrayKeys[0])
&&
is_array($pobjArrayValues[$objArrayKeys[0]])
$objArrayChildKeys =
array_keys($pobjArrayValues[$objArrayKeys[0]]);
if (is_int($objArrayChildKeys[0]))
$pobjArray[$pobjArrayMainKeys[0]]
=
$pobjArrayValues[$objArrayKeys[0]];
Documentation generated on Thu, 19 Jan 2012 00:08:26 +0400 by phpDocumentor 1.4.1