Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Return a formatted string
<?php vsprintf(string $format, array $values): string
<?php public function path()
{
return vsprintf('%s/%s.yaml', [
rtrim(Stache::store('asset-containers')->directory(), '/'),
$this->handle(),
]);
}
<?php public function path()
{
return vsprintf('%s/%s.yaml', [
rtrim(Stache::store('users')->directory(), '/'),
$this->email(),
]);
}
<?php protected function log($message)
{
\Log::debug(vsprintf('%s Denying access to %s.', [
$message,
$this->url(),
]));
}
}
<?php public function path()
{
return vsprintf('%s/%s.yaml', [
rtrim(Stache::store('collections')->directory(), '/'),
$this->handle,
]);
}
public function searchIndex($index = null)
<?php $prefix = $this->date->format($this->hasTime() ? 'Y-m-d-Hi' : 'Y-m-d').'.';
}
return vsprintf('%s/%s/%s%s%s.%s', [
rtrim(Stache::store('entries')->directory(), '/'),
$this->collectionHandle(),
Site::hasMultiple() ? $this->locale().'/' : '',
$prefix,
$this->slug(),
$this->fileExtension(),
]);
}
public function order()
<?php protected function revisionKey()
{
return vsprintf('collections/%s/%s/%s', [
$this->collectionHandle(),
$this->locale(),
$this->id(),
]);
}
protected function revisionAttributes()
<?php public function path()
{
return Path::tidy(vsprintf('%s/%s/%s.yaml', [
Facades\Blueprint::directory(),
str_replace('.', '/', $this->namespace()),
$this->handle(),
]));
}
public function setContents(array $contents)
<?php public function path()
{
return Path::tidy(vsprintf('%s/%s.yaml', [
Facades\Fieldset::directory(),
str_replace('.', '/', $this->handle()),
]));
}
public function setContents(array $contents)
<?php public function path()
{
return vsprintf('%s/%s.%s', [
rtrim(Stache::store('globals')->directory(), '/'),
$this->handle(),
'yaml',
]);
}
public function save()
<?php public function path()
{
return vsprintf('%s/%s%s.%s', [
rtrim(Stache::store('globals')->directory(), '/'),
Site::hasMultiple() ? $this->locale().'/' : '',
$this->handle(),
'yaml',
]);
}
public function editUrl()
<?php return $value;
}
return vsprintf('%d%% %d%%', explode('-', $value));
}
<?php public function path()
{
return vsprintf('%s/%s/%s.yaml', [
Revisions::directory(),
$this->key(),
$this->date()->timestamp,
]);
}
public function fileData()
<?php {
public function path()
{
return vsprintf('%s/%s/working.yaml', [
Revisions::directory(),
$this->key(),
]);
}
public static function fromRevision(Revision $revision)
<?php return null;
}
$url = vsprintf('%s/%s', [
rtrim($this->site()->absoluteUrl(), '/'),
ltrim($uri, '/'),
]);
return $url === '/' ? $url : rtrim($url, '/');
}
<?php return null;
}
return ! $this->ampable() ? null : vsprintf('%s/%s/%s', [
rtrim($this->site()->absoluteUrl(), '/'),
config('statamic.amp.route'),
ltrim($this->uri(), '/'),
]);
}
}