Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 115 | All time: 9,571 This week: 50 |
Version | License | PHP version | Categories | |||
license-detector 1.0 | MIT/X Consortium ... | 5 | PHP 5, Tools, Text processing, Artifi..., P... |
A License information detector, inspired by Licensee and relies on data from choosealicense.com
Using Composer run the following
$ composer require sycho/license-detector
The code uses php's similar_text()
function to tell which license is the one used, the function is quiet expensive and can take up to one second for the results.
Using the Detector
class's parse()
or parseByPath()
methods, you get a License
object containing data about the license
require '...\vendor\autoload.php';
use LicenseDetector\Detector;
$detector = new Detector();
// By license contents
$license = $detector->parse($contents);
// By file path
$license = $detector->parseByPath($path_to_license);
Sign-off your commits, to acknowledge your submission under the license of the project.
Example: Signed-off-by: Your Name <youremail@example.com>
This package is released under the MIT License. A full copy of this license is included in the package file.
Files (51) |
File | Role | Description | ||
---|---|---|---|---|
license-detector (4 files) | ||||
tests (2 files) | ||||
vendor (1 directory) | ||||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (51) | / | license-detector |
File | Role | Description |
---|---|---|
Detector.php | Class | Class source |
License.php | Class | Class source |
Rule.php | Class | Class source |
RuleType.php | Class | Class source |
Files (51) | / | tests |
File | Role | Description |
---|---|---|
DetectorTest.php | Class | Class source |
LICENSE.txt | Doc. | Documentation |
Files (51) | / | vendor | / | choosealicense.com |
File | Role | Description | ||
---|---|---|---|---|
_data (3 files) | ||||
_licenses (36 files) | ||||
LICENSE.md | Lic. | License text | ||
README.md | Lic. | License text |
Files (51) | / | vendor | / | choosealicense.com | / | _data |
File | Role | Description |
---|---|---|
fields.yml | Lic. | License text |
meta.yml | Lic. | License text |
rules.yml | Lic. | License text |
Files (51) | / | vendor | / | choosealicense.com | / | _licenses |
File | Role | Description |
---|---|---|
0bsd.txt | Doc. | Documentation |
afl-3.0.txt | Doc. | Documentation |
agpl-3.0.txt | Doc. | Documentation |
apache-2.0.txt | Doc. | Documentation |
artistic-2.0.txt | Doc. | Documentation |
bsd-2-clause.txt | Doc. | Documentation |
bsd-3-clause-clear.txt | Doc. | Documentation |
bsd-3-clause.txt | Doc. | Documentation |
bsl-1.0.txt | Doc. | Documentation |
cc-by-4.0.txt | Doc. | Documentation |
cc-by-sa-4.0.txt | Doc. | Documentation |
cc0-1.0.txt | Doc. | Documentation |
ecl-2.0.txt | Doc. | Documentation |
epl-1.0.txt | Doc. | Documentation |
epl-2.0.txt | Doc. | Documentation |
eupl-1.1.txt | Doc. | Documentation |
eupl-1.2.txt | Doc. | Documentation |
gpl-2.0.txt | Doc. | Documentation |
gpl-3.0.txt | Doc. | Documentation |
isc.txt | Doc. | Documentation |
lgpl-2.1.txt | Doc. | Documentation |
lgpl-3.0.txt | Doc. | Documentation |
lppl-1.3c.txt | Doc. | Documentation |
mit.txt | Doc. | Documentation |
mpl-2.0.txt | Doc. | Documentation |
ms-pl.txt | Doc. | Documentation |
ms-rl.txt | Doc. | Documentation |
ncsa.txt | Doc. | Documentation |
odbl-1.0.txt | Doc. | Documentation |
ofl-1.1.txt | Doc. | Documentation |
osl-3.0.txt | Doc. | Documentation |
postgresql.txt | Doc. | Documentation |
unlicense.txt | Doc. | Documentation |
upl-1.0.txt | Doc. | Documentation |
wtfpl.txt | Doc. | Documentation |
zlib.txt | Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.