A base class for creating and verifying software licenses.

category OSS
package OSS_License
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

__construct()

__construct($license) 

Parameters

$license

Generate the INI license

generate() : string

Returns

stringThe license

Get a license parameter

getParam(string $p) : string

Parameters

$p

string

The parameter name (INI compatible value)

Returns

stringThe parameter value (or null)

Get all license parameters as an array

getParams() : array

Returns

arrayThe license parameters

Set a license parameter

setParam(string $p, string $v) : \OSS_License_Abstract

Parameters

$p

string

The parameter name (INI compatible value)

$v

string

The parameter value (INI compatible value)

Returns

\OSS_License_AbstractInstance of the license for fluent interfaces

Verify that the license is valid

verify() : bool

Exceptions

\OSS_License_Exception An exception with a public error message

Returns

boolTrue if it is valid (exception on failure)

Create a single string of all license parameters for key verification / generation

_amalgamate() : string

Returns

string

Create an INI format of the license

_createIni() : string

Returns

string

 Properties

 

<p>The licnese key value pairs</p>

$_license : array