is_file
brefphp/bref
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Tells whether the filename is a regular file
is_file
(
string $filename
):
bool
public function
get
(
$id
)
{
$handlerFile
=
$this
->
directory
.
'/'
.
$id
;
if (!
is_file
(
$handlerFile
)) {
throw new
HandlerNotFound
(
"Handler `
$handlerFile
` doesn't exist"
);
}
src/Runtime/FileHandlerLocator.php
public function
has
(
$id
):
bool
{
return
is_file
(
$this
->
directory
.
'/'
.
$id
);
}
}
src/Runtime/FileHandlerLocator.php