novia713 / maginot
Maginot is a php tool class for managing lines into php files
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^5.3.3 || ^7.0
- symfony/filesystem: ^2.3
Requires (Dev)
- phpdocumentor/phpdocumentor: ^2.9
- raveren/kint: ^1.0
This package is not auto-updated.
Last update: 2025-03-01 22:37:16 UTC
README
Maginot is a php tool class for managing lines into php files
Installation
composer require novia713/maginot
Usage
Instance Maginot
use Novia713\Maginot\Maginot; $maginot = new Maginot();
then you can do the following things:
📍 comment a line into a file
WARNING: This comments out all the ocurrences
$maginot->commentLine("this is an example line. can be whatever", $myFile);
📍 uncomment a line into a file [provide the actual line, including the comment symbol]
WARNING: This uncomments out all the ocurrences
$maginot->unCommentLine("this is an example line. can be whatever", $myFile));
📍 set the first line of a file
$maginot->setFirstLine("this is an example line. can be whatever", $myFile));
📍 set the last line of a file_
$maginot->setLastLine("this is an example line. can be whatever", $myFile);
📍 get the first line of a file
$maginot->getFirstLine( $myFile);
📍 get the last line of a file
$maginot->getLastLine( $myFile);
📍 get n line of a file
$maginot->getNLine( $myFile, 2);
📍 get the line number of a given line into a file
$maginot->getLineNumber("this is an example line. can be whatever", $myFile);