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

dev-master 2016-12-06 17:37 UTC

This package is not auto-updated.

Last update: 2024-05-11 18:01: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);