\midcom_core_urlmethods

Matches the given context to a handler or to one of the central URL methods.

URL methods are handled directly from here, handlers are passed back to midcom_application

URL METHODS

The following URL parameters are recognized and are executed before any component processing is done. They all belong to the domain "midcom", e.g. they are executed like this: midcom-$name-$value.

string substyle

This will set a substyle to the current component, which is appended to the style selected by the component at the moment the component style is loaded. The methods substyle_(append|prepend)'s work on the basis of this value then.

Note, that this first assignment is done between can_handle and handle, so it will serve as a basis for all component-side style switching operations.

The substyle URL switch is most useful in conjunction with midcom_application::dynamic_load().

GUID serveattachmentguid

This method will serve the attachment denoted by the given ID/GUID. It uses the default expiration time of serve_attachment (see there).

GUID permalink

This will resolve the given GUID into the MidCOM NAP tree, relocating to the URL corresponding to the node/leaf. The Permalink can be created by using the key MIDCOM_NAV_PERMALINK of any NAP data array. Upon resolving it, MidCOM will relocate to the automatically computed MIDCOM_NAV_FULLURL.

string exec

Allows you to execute certain php files directly, in full MidCOM context. The argument is the name of the component, which holds the script to be executed. Script files are searched in the subdirectory "exec" of the component. If you use "midcom" as component name, MidCOM core scripts, located in lib/midcom/exec will be accessible. The next argument on the command line must be the name of the script file. Accessing subdirectories is not possible, only a single argument will be taken.

The scripts executed need to do their own permission checks, they will work with the credentials of the current MidCOM instance unconditionally.

Example: http://$host/midcom-exec-midcom/update_storage.php

string cache

May take one of the following values: "invalidate" will clear the cache of the current site, "nocache" will bypass the cache for the current request by calling midcom::get()->cache->content->no_cache();

Summary

Methods
Properties
Constants
__construct()
process()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_process_serveattachmentguid()
_process_permalink()
_process_cache()
_process_logout()
_process_login()
_get_remaining_url()
_process_exec()
$_context
N/A

Properties

Methods

process()

process() 

_process_serveattachmentguid()

_process_serveattachmentguid(  $value) 

Parameters

$value

_process_permalink()

_process_permalink(  $value) 

Parameters

$value

_process_cache()

_process_cache(  $value) 

Parameters

$value

_process_logout()

_process_logout(  $value) 

Parameters

$value

_process_login()

_process_login(  $value) 

Parameters

$value

_get_remaining_url()

_get_remaining_url(  $value) 

Parameters

$value

_process_exec()

_process_exec(string  $component) 

Execute any given Script in the current MidCOM context. All files have to be in $component_dir/exec directly, otherwise the script will not execute.

The script's name is taken from the current argv[0].

The script file is executed in the cache's live mode to allow for long running scripts (just produce any output regularly, or Apache will kill you after ~ 2 mins.).

The remaining arguments will be placed into the global $argv.

Parameters

string $component

The component to look in ("midcom" uses core scripts)