CoolCMS API

FtpAsset
in package

FinalYes

Lightweight value object for a file stored in an entity only as a relative path (not through the `Asset` entity / db), typically legacy or upload-folder files such as a user avatar. Gives the same read api as {@see \App\Core\Base\Shared\System\Models\Entities\Asset} (`getFullPath` = url) but without db, variants and meta. Built from the path in the entity through {@see \App\Core\Traits\Shared\Models\Entities\Ftp\AssetPathTrait}.

The front end does not read the disk: existence is not verified (the path is the source of truth).

Table of Contents

Properties

$path  : string

Methods

__construct()  : mixed
exists()  : bool
getFullPath()  : string
Relative path (url) as stored in the db.
getPath()  : string

Properties

Methods

__construct()

public __construct(string $path) : mixed
Parameters
$path : string

exists()

public exists() : bool
Return values
bool

getFullPath()

Relative path (url) as stored in the db.

public getFullPath() : string
Return values
string

getPath()

public getPath() : string
Return values
string
On this page

Search results