comparison vendor/masterminds/html5/bin/entities.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
9 $payload = file_get_contents($ENTITIES_URL); 9 $payload = file_get_contents($ENTITIES_URL);
10 $json = json_decode($payload); 10 $json = json_decode($payload);
11 11
12 $table = array(); 12 $table = array();
13 foreach ($json as $name => $obj) { 13 foreach ($json as $name => $obj) {
14 $sname = substr($name, 1, -1); 14 $sname = substr($name, 1, -1);
15 $table[$sname] = $obj->characters; 15 $table[$sname] = $obj->characters;
16 } 16 }
17 17
18 print '<?php 18 echo '<?php
19 namespace Masterminds\\HTML5; 19 namespace Masterminds\\HTML5;
20 /** Entity lookup tables. This class is automatically generated. */ 20 /** Entity lookup tables. This class is automatically generated. */
21 class Entities { 21 class Entities {
22 public static $byName = '; 22 public static $byName = ';
23 var_export($table); 23 var_export($table);
24 print '; 24 echo ';
25 }' . PHP_EOL; 25 }' . PHP_EOL;
26 //print serialize($table); 26 //print serialize($table);