Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return a formatted string
<?php sprintf(string $format, mixed ...$values): string
<?php }
$drivername = $this->getDriverName();
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name));
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name));
if (class_exists($classnameLocal)) {
<?php $drivername = $this->getDriverName();
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name));
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name));
if (class_exists($classnameLocal)) {
return $classnameLocal;
<?php {
$mime = $this->image->mime ? $this->image->mime : 'image/png';
return sprintf('data:%s;base64,%s',
$mime,
base64_encode($this->process($this->image, $mime, $this->quality))
);
}
<?php {
if ( ! array_key_exists($this->key, $this->command->arguments)) {
throw new InvalidArgumentException(
sprintf("Missing argument %d for %s", $this->key + 1, $this->getCommandName())
);
}
<?php $argument = $this->key + 1;
if (isset($message)) {
$message = sprintf($message, $commandName, $argument);
} else {
$message = sprintf('Missing argument for %d.', $argument);
}
<?php if (isset($message)) {
$message = sprintf($message, $commandName, $argument);
} else {
$message = sprintf('Missing argument for %d.', $argument);
}
throw new InvalidArgumentException(
<?php if ($value < $alpha || $value > $omega) {
throw new InvalidArgumentException(
sprintf('Argument %d must be between %s and %s.', $this->key, $x, $y)
);
}
<?php if ($v < $value) {
throw new InvalidArgumentException(
sprintf('Argument %d must be at least %s.', $this->key, $value)
);
}
<?php if ($v > $value) {
throw new InvalidArgumentException(
sprintf('Argument %d may not be greater than %s.', $this->key, $value)
);
}
<?php $y = $this->argument(2)->type('numeric')->required()->value();
$callback = $this->argument(3)->type('closure')->value();
$circle_classname = sprintf('\Intervention\Image\%s\Shapes\CircleShape',
$image->getDriver()->getDriverName());
$circle = new $circle_classname($diameter);
<?php $y = $this->argument(3)->type('numeric')->required()->value();
$callback = $this->argument(4)->type('closure')->value();
$ellipse_classname = sprintf('\Intervention\Image\%s\Shapes\EllipseShape',
$image->getDriver()->getDriverName());
$ellipse = new $ellipse_classname($width, $height);
<?php } catch (\Exception $e) {
throw new NotReadableException(
sprintf(
"Cannot read the Exif data from the filename (%s) provided ",
$image->dirname . '/' . $image->basename
),
$e->getCode(),
$e
);
<?php $y2 = $this->argument(3)->type('numeric')->required()->value();
$callback = $this->argument(4)->type('closure')->value();
$line_classname = sprintf('\Intervention\Image\%s\Shapes\LineShape',
$image->getDriver()->getDriverName());
$line = new $line_classname($x2, $y2);
<?php );
}
$polygon_classname = sprintf('\Intervention\Image\%s\Shapes\PolygonShape',
$image->getDriver()->getDriverName());
$polygon = new $polygon_classname($points);
<?php $y2 = $this->argument(3)->type('numeric')->required()->value();
$callback = $this->argument(4)->type('closure')->value();
$rectangle_classname = sprintf('\Intervention\Image\%s\Shapes\RectangleShape',
$image->getDriver()->getDriverName());
$rectangle = new $rectangle_classname($x1, $y1, $x2, $y2);