LICENSES_FILE
LICENSES_FILE = 'spdx-licenses.json' : string
$licenses : array
Contains all the licenses.
The array is indexed by license identifiers, which contain a numerically indexed array with license details.
[ lowercased license identifier => [ 0 => identifier (string), 1 => full name (string), 2 => osi certified (bool), 3 => deprecated (bool) ] , ... ]
$exceptions : array
Contains all the license exceptions.
The array is indexed by license exception identifiers, which contain a numerically indexed array with license exception details.
[ lowercased exception identifier => [ 0 => exception identifier (string), 1 => full name (string) ] , ... ]
getLicenseByIdentifier(string $identifier) : array|null
Returns license metadata by license identifier.
This function adds a link to the full license text to the license metadata. The array returned is in the form of:
[ 0 => full name (string), 1 => osi certified, 2 => link to license text (string), 3 => deprecation status (bool) ]
string | $identifier |
getExceptionByIdentifier(string $identifier) : array|null
Returns license exception metadata by license exception identifier.
This function adds a link to the full license exception text to the license exception metadata. The array returned is in the form of:
[ 0 => full name (string), 1 => link to license text (string) ]
string | $identifier |
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Util;
use Composer\Spdx\SpdxLicenses;
trigger_error('The ' . __NAMESPACE__ . '\SpdxLicense class is deprecated, use Composer\Spdx\SpdxLicenses instead.', E_USER_DEPRECATED);
/**
* @deprecated use Composer\Spdx\SpdxLicenses instead
*/
class SpdxLicense extends SpdxLicenses
{
}