lib/MwbExporter/Model/Base.php
protected function populateParameters()
    {
        $this->parameters->clear();
        if ($this->hasParameters() && $this->node) {
            foreach ($this->node->value as $key => $node) {
                $attributes = $node->attributes();
                switch ((string) $attributes['type']) {
                    case 'list':
                        $value = array();
                        foreach ($node->children() as $c) {
                            $value[] = (string) $c;
                        }
                        break;

                    case 'int':
                        if (strlen($value = (string) $node[0])) {
                            $value = (int) $value;
                        } else {
                            $value = null;
                        }
                        break;

                    default:
                        $value = (string) $node[0];
                        break;
                }
                $this->parameters->set((string) $attributes['key'], $value);
            }
        }
    }
protected function populateParameters()
    {
        $this->parameters->clear();
        if ($this->hasParameters() && $this->node) {
            foreach ($this->node->value as $key => $node) {
                $attributes = $node->attributes();
                switch ((string) $attributes['type']) {
                    case 'list':
                        $value = array();
                        foreach ($node->children() as $c) {
                            $value[] = (string) $c;
                        }
                        break;

                    case 'int':
                        if (strlen($value = (string) $node[0])) {
                            $value = (int) $value;
                        } else {
                            $value = null;
                        }
                        break;

                    default:
                        $value = (string) $node[0];
                        break;
                }
                $this->parameters->set((string) $attributes['key'], $value);
            }
        }
    }
protected function populateParameters ( ) { $ this -> parameters -> clear ( ) ; if ( $ this -> hasParameters ( ) && $ this -> node ) { foreach ( $ this -> node -> value as $ key => $ node ) { $ attributes = $ node -> attributes ( ) ; switch ( ( string ) $ attributes [ 'type' ] ) { case 'list' : $ value = array ( ) ; foreach ( $ node -> children ( ) as $ c ) { $ value [ ] = ( string ) $ c ; } break ; case 'int' : if ( strlen ( $ value = ( string ) $ node [ 0 ] ) ) { $ value = ( int ) $ value ; } else { $ value = null ; } break ; default : $ value = ( string ) $ node [ 0 ] ; break ; } $ this -> parameters -> set ( ( string ) $ attributes [ 'key' ] , $ value ) ; } } }
Populate parameters from XML node.
Populate parameters from XML node .