for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace League\Plates\Extension\Path;
class ResolveNameArgs
{
public $path;
public $context;
private $resolve_path;
public function __construct($path, array $context, callable $resolve_path) {
$this->path = $path;
$this->context = $context;
$this->resolve_path = $resolve_path;
}
public function withPath($path) {
return new self($path, $this->context, $this->resolve_path);
public function withContext(array $context) {
return new self($this->path, $context, $this->resolve_path);
public function resolvePath($path = null, array $context = []) {
return new self($path ?: $this->path, $context ?: $this->context, $this->resolve_path);
public static function fromTemplate(Template $template, callable $resolve_path) {
return new self($template->name, $template->context, $resolve_path);