PHP code example of lorenzo / pinky

1. Go to this page and download the library: Download lorenzo/pinky 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/ */

    

lorenzo / pinky example snippets



use Pinky;

$transpiled = Pinky\transformFile('path/to/file.html');

// $transpiled is an instance of DOMDocument
echo $transpiled->saveHTML();


use Pinky;

$transpiled = Pinky\transformString('<row>Contents</row>');
echo $transpiled->saveHTML();


use Pinky;

$files = [$path1, $path2, $path3];

$transpiled = Pinky\transformManyFiles($files);
foreach ($transpiled as $result) {
    echo $result->saveHTML();
}