src/Control/Controller.php
public function removeAction($fullURL, $action = null)
    {
        if (!$action) {
            $action = $this->getAction();    //default to current action
        }
        $returnURL = $fullURL;

        if (($pos = strpos($fullURL, $action)) !== false) {
            $returnURL = substr($fullURL, 0, $pos);
        }

        return $returnURL;
    }
public function removeAction($fullURL, $action = null)
    {
        if (!$action) {
            $action = $this->getAction();    //default to current action
        }
        $returnURL = $fullURL;

        if (($pos = strpos($fullURL, $action)) !== false) {
            $returnURL = substr($fullURL, 0, $pos);
        }

        return $returnURL;
    }
public function removeAction ( $ fullURL , $ action = null ) { if ( ! $ action ) { $ action = $ this -> getAction ( ) ; //default to current action } $ returnURL = $ fullURL ; if ( ( $ pos = strpos ( $ fullURL , $ action ) ) !== false ) { $ returnURL = substr ( $ fullURL , 0 , $ pos ) ; } return $ returnURL ; }
Removes all the "action" part of the current URL and returns the result. If no action parameter
is present, returns the full URL.

@param string $fullURL
@param null|string $action

@return string
Removes all the action part of the current URL and returns the result . If no action parameter is present returns the full URL .