File: UPGRADING.md

package info (click to toggle)
php-masterminds-html5 2.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 824 kB
  • sloc: php: 9,678; makefile: 21
file content (21 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From 1.x to 2.x
=================

- All classes uses `Masterminds` namespace.
- All public static methods has been removed from `HTML5` class and the general API to access the HTML5 functionalities has changed. 

    Before:
    
        $dom = \HTML5::loadHTML('<html>....');
        \HTML5::saveHTML($dom);
        
    After:

        use Masterminds\HTML5;
        
        $html5 = new HTML5();
        
        $dom = $html5->loadHTML('<html>....');
        echo $html5->saveHTML($dom);