PHP code example of fabrn / ydk-file-reader
1. Go to this page and download the library: Download fabrn/ydk-file-reader 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/ */
fabrn / ydk-file-reader example snippets
$ydk = Ydk::readFile('my_file.ydk');
class MyYdkParser implements YdkParserInterface
{
public function parse(string $ydk): array
{
// TODO : parse YDK content
}
}
$ydk = Ydk::readFile('my_file.ydk', new MyYdkParser());
$ydk = new Ydk($ydkContent);
$ydk = new Ydk($ydkContent, new MyYdkParser());