src/ministruts/ActionMapping.php
public function freeze() {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $name    = $this->name ? ' name="'.$this->name.'"':'';
        $path    = $this->path ? ' path="'.$this->path.'"':'';
        $mapping = $name.$path;

        if (!$this->path)                                           throw new StrutsConfigException('<mapping'.$mapping.': A "path" attribute must be configured for '.$this);
        if (!$this->formClassName && $this->formValidateFirst)      throw new StrutsConfigException('<mapping'.$mapping.': A form must be configured if "form-validate-first" is set to "true".');

        if (!$this->actionClassName && !$this->forward) {
            if (!$this->formClassName || !$this->formValidateFirst) throw new StrutsConfigException('<mapping'.$mapping.': Either an "action", "include", "forward" or "redirect" attribute must be specified.');

            if (!$this->formClassName || !$this->formValidateFirst) {
                throw new StrutsConfigException('<mapping'.$mapping.': Either an "action", "include", "forward" or "redirect" attribute must be specified.');
            }
            elseif ($this->formClassName && $this->formValidateFirst) {
                if (!isset($this->forwards[ActionForward::VALIDATION_SUCCESS_KEY]) || !isset($this->forwards[ActionForward::VALIDATION_ERROR_KEY]))
                    throw new StrutsConfigException('<mapping'.$mapping.' form="'.$this->formClassName.'": A "success" and "error" forward must be configured to validate the form.');
            }
        }

        $this->configured = true;
        return $this;
    }
public function freeze() {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $name    = $this->name ? ' name="'.$this->name.'"':'';
        $path    = $this->path ? ' path="'.$this->path.'"':'';
        $mapping = $name.$path;

        if (!$this->path)                                           throw new StrutsConfigException('<mapping'.$mapping.': A "path" attribute must be configured for '.$this);
        if (!$this->formClassName && $this->formValidateFirst)      throw new StrutsConfigException('<mapping'.$mapping.': A form must be configured if "form-validate-first" is set to "true".');

        if (!$this->actionClassName && !$this->forward) {
            if (!$this->formClassName || !$this->formValidateFirst) throw new StrutsConfigException('<mapping'.$mapping.': Either an "action", "include", "forward" or "redirect" attribute must be specified.');

            if (!$this->formClassName || !$this->formValidateFirst) {
                throw new StrutsConfigException('<mapping'.$mapping.': Either an "action", "include", "forward" or "redirect" attribute must be specified.');
            }
            elseif ($this->formClassName && $this->formValidateFirst) {
                if (!isset($this->forwards[ActionForward::VALIDATION_SUCCESS_KEY]) || !isset($this->forwards[ActionForward::VALIDATION_ERROR_KEY]))
                    throw new StrutsConfigException('<mapping'.$mapping.' form="'.$this->formClassName.'": A "success" and "error" forward must be configured to validate the form.');
            }
        }

        $this->configured = true;
        return $this;
    }
public function freeze ( ) { if ( $ this -> configured ) throw new IllegalStateException ( 'Configuration is frozen' ) ; $ name = $ this -> name ? ' name="' . $ this -> name . '"' : '' ; $ path = $ this -> path ? ' path="' . $ this -> path . '"' : '' ; $ mapping = $ name . $ path ; if ( ! $ this -> path ) throw new StrutsConfigException ( '<mapping' . $ mapping . ': A "path" attribute must be configured for ' . $ this ) ; if ( ! $ this -> formClassName && $ this -> formValidateFirst ) throw new StrutsConfigException ( '<mapping' . $ mapping . ': A form must be configured if "form-validate-first" is set to "true".' ) ; if ( ! $ this -> actionClassName && ! $ this -> forward ) { if ( ! $ this -> formClassName || ! $ this -> formValidateFirst ) throw new StrutsConfigException ( '<mapping' . $ mapping . ': Either an "action", "include", "forward" or "redirect" attribute must be specified.' ) ; if ( ! $ this -> formClassName || ! $ this -> formValidateFirst ) { throw new StrutsConfigException ( '<mapping' . $ mapping . ': Either an "action", "include", "forward" or "redirect" attribute must be specified.' ) ; } elseif ( $ this -> formClassName && $ this -> formValidateFirst ) { if ( ! isset ( $ this -> forwards [ ActionForward :: VALIDATION_SUCCESS_KEY ] ) || ! isset ( $ this -> forwards [ ActionForward :: VALIDATION_ERROR_KEY ] ) ) throw new StrutsConfigException ( '<mapping' . $ mapping . ' form="' . $ this -> formClassName . '": A "success" and "error" forward must be configured to validate the form.' ) ; } } $ this -> configured = true ; return $ this ; }
Lock the mapping's configuration. Called after all properties of the mapping are set.

@return $this

@throws StrutsConfigException on configuration errors
Lock the mapping s configuration . Called after all properties of the mapping are set .