for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gaufrette\Extras\Resolvable\Resolver;
use Gaufrette\Extras\Resolvable\ResolverInterface;
/**
* Resolves object path by prepending a static prefix.
*
* @author Albin Kerouanton <[email protected]>
*/
class StaticUrlResolver implements ResolverInterface
{
/** @var string */
private $prefix;
* @param string $prefix
public function __construct($prefix)
$this->prefix = rtrim($prefix, '/');
}
* {@inheritdoc}
public function resolve($path)
return $this->prefix . '/' . ltrim($path, '/');