protected function isRequired($argument, $scope = 'Index', $method = Doozr_Http::REQUEST_METHOD_GET)
    {
        // Prepare storage on method/verb level
        if (false === isset($this->required[$method])) {
            return false;
        }

        // Prepare storage on scope level
        if (false === isset($this->required[$method][$scope])) {
            return false;
        }

        // Convert input to array if not an array
        if (false === is_array($argument)) {
            $argument = [$argument];
        }

        // Iterate the passed input to build ordered (scope) rules
        foreach ($argument as $requiredVariable) {
            pre($requiredVariable);
        }

        // Success
        return true;
    }
protected function isRequired($argument, $scope = 'Index', $method = Doozr_Http::REQUEST_METHOD_GET)
    {
        // Prepare storage on method/verb level
        if (false === isset($this->required[$method])) {
            return false;
        }

        // Prepare storage on scope level
        if (false === isset($this->required[$method][$scope])) {
            return false;
        }

        // Convert input to array if not an array
        if (false === is_array($argument)) {
            $argument = [$argument];
        }

        // Iterate the passed input to build ordered (scope) rules
        foreach ($argument as $requiredVariable) {
            pre($requiredVariable);
        }

        // Success
        return true;
    }
protected function isRequired ( $ argument , $ scope = 'Index' , $ method = Doozr_Http :: REQUEST_METHOD_GET ) { // Prepare storage on method/verb level if ( false === isset ( $ this -> required [ $ method ] ) ) { return false ; } // Prepare storage on scope level if ( false === isset ( $ this -> required [ $ method ] [ $ scope ] ) ) { return false ; } // Convert input to array if not an array if ( false === is_array ( $ argument ) ) { $ argument = [ $ argument ] ; } // Iterate the passed input to build ordered (scope) rules foreach ( $ argument as $ requiredVariable ) { pre ( $ requiredVariable ) ; } // Success return true ; }
Returns TRUE if a passed arguments is required by presenter, FALSE if not.

@param string $argument The argument to check
@param string $scope    The scope used for lookup
@param string $method   The method (HTTP verb) to use for lookup

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if required, otherwise FALSE
Returns TRUE if a passed arguments is required by presenter FALSE if not .