for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TwinDigital\WPTools\Router;
class Route
{
protected $hook = null;
protected $path = null;
protected $template = null;
/**
* Route constructor.
* @param string $path
* @param null $hook
$hook
null
* @param null $template
$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;