src/lib/CronFileWriter.php
public function create($delim = '#', $data = PHP_EOL)
    {
        //first check for existing then update
        if ($this->read($delim)) {
            $this->update($delim, $data);
        } else {
            //create new entry
            file_put_contents(
                $this->file,
                PHP_EOL.'# '.$delim.PHP_EOL.$data.PHP_EOL.'# \\'.$delim.PHP_EOL,
                FILE_APPEND
            );
        }
    }
public function create($delim = '#', $data = PHP_EOL)
    {
        //first check for existing then update
        if ($this->read($delim)) {
            $this->update($delim, $data);
        } else {
            //create new entry
            file_put_contents(
                $this->file,
                PHP_EOL.'# '.$delim.PHP_EOL.$data.PHP_EOL.'# \\'.$delim.PHP_EOL,
                FILE_APPEND
            );
        }
    }
public function create ( $ delim = '#' , $ data = PHP_EOL ) { //first check for existing then update if ( $ this -> read ( $ delim ) ) { $ this -> update ( $ delim , $ data ) ; } else { //create new entry file_put_contents ( $ this -> file , PHP_EOL . '# ' . $ delim . PHP_EOL . $ data . PHP_EOL . '# \\' . $ delim . PHP_EOL , FILE_APPEND ) ; } }
Create or update an entry in the .htaccess file

@param string $data
@param string $delim
Create or update an entry in the . htaccess file