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.
Classes of Sami Ilyes Mazouz | > | PHP License Detector | > | Download .zip .tar.gz | > | Support forum | > | Blog | > | Latest changes |
|
|
Groups | Applications | Files |
Groups |
PHP 5 | Classes using PHP 5 specific features | View top rated classes |
Utilities and Tools | General purpose tools to simplify software development | View top rated classes |
Text processing | Manipulating and validating text data | View top rated classes |
Artificial intelligence | Automation of tasks using human-like intelligence | View top rated classes |
Parsers | Programming language interpreters and format parsers | View top rated classes |
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Files |
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 | / | 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 | / | tests |
File | Role | Description |
---|---|---|
DetectorTest.php | Class | Class source |
LICENSE.txt | Doc. | Documentation |
Files | / | vendor | / | choosealicense.com |
File | Role | Description | ||
---|---|---|---|---|
_data (3 files) | ||||
_licenses (36 files) | ||||
LICENSE.md | Lic. | License text | ||
README.md | Lic. | License text |
Files | / | vendor | / | choosealicense.com | / | _data |
File | Role | Description |
---|---|---|
fields.yml | Lic. | License text |
meta.yml | Lic. | License text |
rules.yml | Lic. | License text |
Files | / | 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 |
Download all files: license-detector.tar.gz license-detector.zip NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|