public static function populateJsonOnlyEntities($xmlObj)
   {
       if (isset($xmlObj) &&
            isset($xmlObj->intuit->ipp->specialConfiguration)) {
           $specialCnf = $xmlObj->intuit->ipp->specialConfiguration;
           if (!$specialCnf instanceof SimpleXMLElement) {
               return false;
           }
           if (!$specialCnf->children() instanceof SimpleXMLElement) {
               return false;
           }
           if (!$specialCnf->children()->count()) {
               return false;
           }
           $rules = array();
           foreach ($specialCnf->children() as $entity) {
               if (!$entity->attributes()->count()) {
                   continue;
               }
               $name = self::decorateEntity($entity->getName());
               if (!array_key_exists($name, $rules)) {
                   $rules[$name] = array();
               }
               foreach ($entity->attributes() as $attr) {
                   $rules[$name][$attr->getName()] = filter_var((string)$entity->attributes(), FILTER_VALIDATE_BOOLEAN);
               }
           }
           return $rules;
       }
       return false;
   }
public static function populateJsonOnlyEntities($xmlObj)
   {
       if (isset($xmlObj) &&
            isset($xmlObj->intuit->ipp->specialConfiguration)) {
           $specialCnf = $xmlObj->intuit->ipp->specialConfiguration;
           if (!$specialCnf instanceof SimpleXMLElement) {
               return false;
           }
           if (!$specialCnf->children() instanceof SimpleXMLElement) {
               return false;
           }
           if (!$specialCnf->children()->count()) {
               return false;
           }
           $rules = array();
           foreach ($specialCnf->children() as $entity) {
               if (!$entity->attributes()->count()) {
                   continue;
               }
               $name = self::decorateEntity($entity->getName());
               if (!array_key_exists($name, $rules)) {
                   $rules[$name] = array();
               }
               foreach ($entity->attributes() as $attr) {
                   $rules[$name][$attr->getName()] = filter_var((string)$entity->attributes(), FILTER_VALIDATE_BOOLEAN);
               }
           }
           return $rules;
       }
       return false;
   }
public static function populateJsonOnlyEntities ( $ xmlObj ) { if ( isset ( $ xmlObj ) && isset ( $ xmlObj -> intuit -> ipp -> specialConfiguration ) ) { $ specialCnf = $ xmlObj -> intuit -> ipp -> specialConfiguration ; if ( ! $ specialCnf instanceof SimpleXMLElement ) { return false ; } if ( ! $ specialCnf -> children ( ) instanceof SimpleXMLElement ) { return false ; } if ( ! $ specialCnf -> children ( ) -> count ( ) ) { return false ; } $ rules = array ( ) ; foreach ( $ specialCnf -> children ( ) as $ entity ) { if ( ! $ entity -> attributes ( ) -> count ( ) ) { continue ; } $ name = self :: decorateEntity ( $ entity -> getName ( ) ) ; if ( ! array_key_exists ( $ name , $ rules ) ) { $ rules [ $ name ] = array ( ) ; } foreach ( $ entity -> attributes ( ) as $ attr ) { $ rules [ $ name ] [ $ attr -> getName ( ) ] = filter_var ( ( string ) $ entity -> attributes ( ) , FILTER_VALIDATE_BOOLEAN ) ; } } return $ rules ; } return false ; }
Returns array in a OperationControlList rules format from XML
@param \SimpleXMLElement $xmlObj
@return boolean
Returns array in a OperationControlList rules format from XML