๐ maginot
Maginot is a php tool class for managing lines into php files, (*1)
Installation
composer require novia713/maginot
, (*2)
Usage
Instance Maginot, (*3)
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*
```php
$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*
```php
$maginot->unCommentLine("this is an example line. can be whatever", $myFile));
```
๐ _set the first line of a file_
```php
$maginot->setFirstLine("this is an example line. can be whatever", $myFile));
```
๐ set the last line of a file_
```php
$maginot->setLastLine("this is an example line. can be whatever", $myFile);
```
๐ _get the first line of a file_
```php
$maginot->getFirstLine( $myFile);
```
๐ _get the last line of a file_
```php
$maginot->getLastLine( $myFile);
๐ get n line of a file
```php, (*4)
$maginot->getNLine( $myFile, 2);
```, (*5)
๐ get the line number of a given line into a file
php
$maginot->getLineNumber("this is an example line. can be whatever", $myFile);
, (*6)