Documentation

Licenses
in package

Class Licenses

Table of Contents

Properties

$file  : FileInterface
$regex  : string

Methods

get()  : array<string|int, string>|string
Returns the license for a Premium package
getLicenseFile()  : FileInterface
Get the License File object
set()  : bool
Returns the license for a Premium package
validate()  : bool
Validates the License format

Properties

$file

protected static FileInterface $file

$regex

protected static string $regex = '^(?:[A-F0-9]{8}-){3}(?:[A-F0-9]{8}){1}$'

Regex to validate the format of a License

Methods

get()

Returns the license for a Premium package

public static get([string|null $slug = null ]) : array<string|int, string>|string
Parameters
$slug : string|null = null
Return values
array<string|int, string>|string

getLicenseFile()

Get the License File object

public static getLicenseFile() : FileInterface
Return values
FileInterface

set()

Returns the license for a Premium package

public static set(string $slug, string $license) : bool
Parameters
$slug : string
$license : string
Return values
bool

validate()

Validates the License format

public static validate([string|null $license = null ]) : bool
Parameters
$license : string|null = null
Return values
bool

        
On this page

Search results