# \nre\coreLinker

Class to create web links based on the current request.

## Summary

Methods
Properties
Constants
__construct()
createLinkParam()
createLinkParams()
link()
hardlink()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
createLink()
createUrl()
$request
N/A

File
  core/Linker.inc
Package
  Default
Class hierarchy
  \nre\core\Linker

## Tags

author | coderkun olli@coderkun.de

## Properties

### $request

    $request : \nre\core\Request

Current request

#### Type

\nre\core\Request

#

## Tags

None found

## Methods

### __construct()

    __construct(\nre\core\Request  $request)

Construct a new linker.

#### Parameters

\nre\core\Request | $request | Current request

#

## Tags

None found

### createLinkParam()

    createLinkParam(string  $param1) : string

Mask parameters to be used in an URL.

#### Parameters

string | $param1 | First parameter

#### Returns

string —

Masked parameters as string

#

static

## Tags

None found

### createLinkParams()

    createLinkParams(string  $param1) : string

Mask parameters to be used in an URL.

#### Parameters

string | $param1 | First parameter

#### Returns

string —

Masked parameters as array

#

static

## Tags

None found

### link()

    link(array  $params = null, integer  $offset, boolean  $exclusiveParams = true, array  $getParams = null, boolean  $exclusiveGetParams = true, string  $anchor = null, boolean  $absolute = false) : string

Create a web link.

#### Parameters

array | $params | Parameters to use
integer | $offset | Ignore first parameters
boolean | $exclusiveParams | Use only the given parameters
array | $getParams | GET-parameter to use
boolean | $exclusiveGetParams | Use only the given GET-parameters
string | $anchor | Target anchor
boolean | $absolute | Include hostname etc. for an absolute URL

#### Returns

string —

Created link

#

## Tags

None found

### hardlink()

    hardlink(string  $url, boolean  $absolute = false) : string

Create a link from an URL.

#### Parameters

string | $url | URL to create link from
boolean | $absolute | Create absolute URL

#### Returns

string —

Created link

#

## Tags

None found

### createLink()

    createLink(\nre\core\Request  $request, \nre\core\Response  $response, string  $anchor = null, boolean  $absolute = false) : string

Create a link.

#### Parameters

\nre\core\Request | $request | Current request
\nre\core\Response | $response | Current response
string | $anchor | Anchor on target
boolean | $absolute | Create absolute link

#### Returns

string —

Created link

#

static

## Tags

None found

### createUrl()

    createUrl(string  $url, \nre\core\Request  $request, boolean  $absolute = false) : string

Adapt a link to the environment.

#### Parameters

string | $url | URL
\nre\core\Request | $request | Current request
boolean | $absolute | Create absolute URL

#### Returns

string —

Adapted URL

#

static

## Tags

None found

### Linker.inc