Route Class

Aurora\Router Namespace

Traits


Properties

slug

Slug

protected $slug = '': string

handler

Handler

protected $handler: mixed

hash

Hash

protected $hash = '': string

name

Name

protected $name = '': string

methods

Supported methods

protected $methods = []: array

Constructor

__construct

Constructor

Parameters

  • string $slug — Route slug
  • mixed $handler — Handler

Signature

public function __construct(string $slug, mixed $handler)

Methods

__construct

Constructor

Parameters

  • string $slug — Route slug
  • mixed $handler — Handler

Signature

public function __construct(string $slug, mixed $handler)

setSlug

Set slug

Parameters

  • string $slug — Route slug

Return Value

  • $this

Signature

public function setSlug(string $slug)

setName

Set name

Parameters

  • string $name — Route name

Return Value

  • $this

Signature

public function setName(string $name)

setMethods

Set supported methods

Parameters

  • mixed $methods — Methods supported

Return Value

  • $this

Signature

public function setMethods(mixed $methods)

getSlug

Get slug

Return Value

  • string

Signature

public function getSlug(): string

getHash

Get hash

Return Value

  • string

Signature

public function getHash(): string

getName

Get name

Return Value

  • string

Signature

public function getName(): string

getHandler

Get handler

Return Value

  • mixed

Signature

public function getHandler()

getMethods

Get supported methods

Return Value

  • array

Signature

public function getMethods(): array

updateHash

Update the route hash

Return Value

  • $this

Signature

protected function updateHash()

Go to top