protected static _prefix ( string $path, object $context = null, array $options = [] ) : string | ||
$path | string | The URL to be prefixed. |
$context | object | The request context. |
$options | array | Options for generating the proper prefix. Currently accepted values are: `'absolute' => true|false`, `'host' => string` and `'scheme' => string`. |
리턴 | string | The prefixed URL, depending on the passed options. |
protected static function _prefix($path, $context = null, array $options = array())
{
$defaults = array('scheme' => null, 'host' => null, 'absolute' => false);
$options += $defaults;
return $options['absolute'] ? "{$options['scheme']}{$options['host']}{$path}" : $path;
}