PHP code example of darrynten / after-the-deadline-php

1. Go to this page and download the library: Download darrynten/after-the-deadline-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

darrynten / after-the-deadline-php example snippets


use DarrynTen\AfterTheDeadlinePhp\AfterTheDeadline;

// Config options
$config = [
  'key' => 'my-generated-key',  // At the very least
  'text' => $text,              // You can pass text in
  'format' => 'html'            // You can also specify (plain is default)
];

// Make a translator
$checker = new AfterTheDeadline($config);

// Set text and type (html or plain)
$checker->setText($text);
$language->setFormat('plain');

// Enable / disable caching
$language->setCache(false);

// Get suggestions
$checker->checkDocument(); // does both spelling and grammar
$checker->checkGrammar();  // only does grammar

// Get stats on the text
$checker->stats();

// Get an explanation on the grammar of an incorrect type
// Not yet implemented
$checker->getInfo($term);  // e.g. 'to be' should be re-written in active

composer