src/ministruts/Module.php
protected function processController(\SimpleXMLElement $xml) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $elements = $xml->xpath('/struts-config/controller') ?: [];

        foreach ($elements as $tag) {
            if (isset($tag['request-processor'])) {
                $name       = trim((string) $tag['request-processor']);
                $classNames = $this->resolveClassName($name);
                if (!$classNames)            throw new StrutsConfigException('<controller request-processor="'.$tag['request-processor'].'": Class not found.');
                if (sizeof($classNames) > 1) throw new StrutsConfigException('<controller request-processor="'.$tag['request-processor'].'": Ambiguous class name, found "'.join('", "', $classNames).'"');
                $this->setRequestProcessorClass($classNames[0]);
            }

            if (isset($tag['role-processor'])) {
                $name       = trim((string) $tag['role-processor']);
                $classNames = $this->resolveClassName($name);
                if (!$classNames)            throw new StrutsConfigException('<controller role-processor="'.$tag['role-processor'].'": Class not found.');
                if (sizeof($classNames) > 1) throw new StrutsConfigException('<controller role-processor="'.$tag['role-processor'].'": Ambiguous class name, found "'.join('", "', $classNames).'"');
                $this->setRoleProcessorClass($classNames[0]);
            }
        }
    }
protected function processController(\SimpleXMLElement $xml) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $elements = $xml->xpath('/struts-config/controller') ?: [];

        foreach ($elements as $tag) {
            if (isset($tag['request-processor'])) {
                $name       = trim((string) $tag['request-processor']);
                $classNames = $this->resolveClassName($name);
                if (!$classNames)            throw new StrutsConfigException('<controller request-processor="'.$tag['request-processor'].'": Class not found.');
                if (sizeof($classNames) > 1) throw new StrutsConfigException('<controller request-processor="'.$tag['request-processor'].'": Ambiguous class name, found "'.join('", "', $classNames).'"');
                $this->setRequestProcessorClass($classNames[0]);
            }

            if (isset($tag['role-processor'])) {
                $name       = trim((string) $tag['role-processor']);
                $classNames = $this->resolveClassName($name);
                if (!$classNames)            throw new StrutsConfigException('<controller role-processor="'.$tag['role-processor'].'": Class not found.');
                if (sizeof($classNames) > 1) throw new StrutsConfigException('<controller role-processor="'.$tag['role-processor'].'": Ambiguous class name, found "'.join('", "', $classNames).'"');
                $this->setRoleProcessorClass($classNames[0]);
            }
        }
    }
protected function processController ( \ SimpleXMLElement $ xml ) { if ( $ this -> configured ) throw new IllegalStateException ( 'Configuration is frozen' ) ; $ elements = $ xml -> xpath ( '/struts-config/controller' ) ? : [ ] ; foreach ( $ elements as $ tag ) { if ( isset ( $ tag [ 'request-processor' ] ) ) { $ name = trim ( ( string ) $ tag [ 'request-processor' ] ) ; $ classNames = $ this -> resolveClassName ( $ name ) ; if ( ! $ classNames ) throw new StrutsConfigException ( '<controller request-processor="' . $ tag [ 'request-processor' ] . '": Class not found.' ) ; if ( sizeof ( $ classNames ) > 1 ) throw new StrutsConfigException ( '<controller request-processor="' . $ tag [ 'request-processor' ] . '": Ambiguous class name, found "' . join ( '", "' , $ classNames ) . '"' ) ; $ this -> setRequestProcessorClass ( $ classNames [ 0 ] ) ; } if ( isset ( $ tag [ 'role-processor' ] ) ) { $ name = trim ( ( string ) $ tag [ 'role-processor' ] ) ; $ classNames = $ this -> resolveClassName ( $ name ) ; if ( ! $ classNames ) throw new StrutsConfigException ( '<controller role-processor="' . $ tag [ 'role-processor' ] . '": Class not found.' ) ; if ( sizeof ( $ classNames ) > 1 ) throw new StrutsConfigException ( '<controller role-processor="' . $ tag [ 'role-processor' ] . '": Ambiguous class name, found "' . join ( '", "' , $ classNames ) . '"' ) ; $ this -> setRoleProcessorClass ( $ classNames [ 0 ] ) ; } } }
Verarbeitet Controller-Einstellungen.

@param  \SimpleXMLElement $xml - XML-Objekt mit der Konfiguration

@throws StrutsConfigException on configuration errors
Verarbeitet Controller - Einstellungen .