for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TwinDigital\WPTools\Router;
class Route
{
/**
* @var string
*/
protected $path;
* @var string|null
protected $hook;
protected $template;
* Route constructor.
* @param string $path
* @param string|null $hook
* @param string|null $template
public function __construct(string $path, $hook = null, $template = null)
$this->hook = $hook;
$this->path = $path;
$this->template = $template;
}
* @return string
public function hasHook()
return $this->hook !== null;
public function getPath()
return $this->path;
public function getHook()
return $this->hook;
public function getTemplate()
return $this->template;
public function hasTemplate()
return $this->template !== null;