Skip to content

Commit c1cadd8

Browse files
committed
Updated readme.md and docs
1 parent 41b3645 commit c1cadd8

File tree

2 files changed

+202
-6
lines changed

2 files changed

+202
-6
lines changed

README.md

Lines changed: 199 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,203 @@ PHP class for validating web documents with W3C validation API
1414

1515
var_dump($validate->getReport());
1616

17-
die();
17+
/*
1818

19+
Output:
20+
------------------------------------------------------------
21+
array(6) {
22+
["URI"]=>
23+
string(23) "http://www.walla.co.il/"
24+
["Validity"]=>
25+
bool(false)
26+
["Errors"]=>
27+
int(441)
28+
["Error List"]=>
29+
array(10) {
30+
[0]=>
31+
array(3) {
32+
["line"]=>
33+
string(2) "10"
34+
["column"]=>
35+
string(2) "17"
36+
["message"]=>
37+
string(32) "there is no attribute "property""
38+
}
39+
[1]=>
40+
array(3) {
41+
["line"]=>
42+
string(2) "23"
43+
["column"]=>
44+
string(1) "9"
45+
["message"]=>
46+
string(39) "required attribute "type" not specified"
47+
}
48+
[2]=>
49+
array(3) {
50+
["line"]=>
51+
string(2) "62"
52+
["column"]=>
53+
string(1) "8"
54+
["message"]=>
55+
string(39) "required attribute "type" not specified"
56+
}
57+
[3]=>
58+
array(3) {
59+
["line"]=>
60+
string(3) "260"
61+
["column"]=>
62+
string(2) "96"
63+
["message"]=>
64+
string(41) "required attribute "action" not specified"
65+
}
66+
[4]=>
67+
array(3) {
68+
["line"]=>
69+
string(3) "262"
70+
["column"]=>
71+
string(3) "178"
72+
["message"]=>
73+
string(36) "there is no attribute "autocomplete""
74+
}
75+
[5]=>
76+
array(3) {
77+
["line"]=>
78+
string(3) "307"
79+
["column"]=>
80+
string(3) "114"
81+
["message"]=>
82+
string(61) "general entity "utm_medium" not defined and no default entity"
83+
}
84+
[6]=>
85+
array(3) {
86+
["line"]=>
87+
string(3) "307"
88+
["column"]=>
89+
string(3) "124"
90+
["message"]=>
91+
string(82) "reference to entity "utm_medium" for which no system identifier could be generated"
92+
}
93+
[7]=>
94+
array(3) {
95+
["line"]=>
96+
string(3) "307"
97+
["column"]=>
98+
string(3) "130"
99+
["message"]=>
100+
string(62) "general entity "utm_content" not defined and no default entity"
101+
}
102+
[8]=>
103+
array(3) {
104+
["line"]=>
105+
string(3) "307"
106+
["column"]=>
107+
string(3) "141"
108+
["message"]=>
109+
string(83) "reference to entity "utm_content" for which no system identifier could be generated"
110+
}
111+
[9]=>
112+
array(3) {
113+
["line"]=>
114+
string(3) "307"
115+
["column"]=>
116+
string(3) "149"
117+
["message"]=>
118+
string(63) "general entity "utm_campaign" not defined and no default entity"
119+
}
120+
}
121+
["Warnings"]=>
122+
int(441)
123+
["Warning List"]=>
124+
array(10) {
125+
[0]=>
126+
array(3) {
127+
["line"]=>
128+
string(2) "10"
129+
["column"]=>
130+
string(2) "17"
131+
["message"]=>
132+
string(32) "there is no attribute "property""
133+
}
134+
[1]=>
135+
array(3) {
136+
["line"]=>
137+
string(2) "23"
138+
["column"]=>
139+
string(1) "9"
140+
["message"]=>
141+
string(39) "required attribute "type" not specified"
142+
}
143+
[2]=>
144+
array(3) {
145+
["line"]=>
146+
string(2) "62"
147+
["column"]=>
148+
string(1) "8"
149+
["message"]=>
150+
string(39) "required attribute "type" not specified"
151+
}
152+
[3]=>
153+
array(3) {
154+
["line"]=>
155+
string(3) "260"
156+
["column"]=>
157+
string(2) "96"
158+
["message"]=>
159+
string(41) "required attribute "action" not specified"
160+
}
161+
[4]=>
162+
array(3) {
163+
["line"]=>
164+
string(3) "262"
165+
["column"]=>
166+
string(3) "178"
167+
["message"]=>
168+
string(36) "there is no attribute "autocomplete""
169+
}
170+
[5]=>
171+
array(3) {
172+
["line"]=>
173+
string(3) "307"
174+
["column"]=>
175+
string(3) "114"
176+
["message"]=>
177+
string(61) "general entity "utm_medium" not defined and no default entity"
178+
}
179+
[6]=>
180+
array(3) {
181+
["line"]=>
182+
string(3) "307"
183+
["column"]=>
184+
string(3) "124"
185+
["message"]=>
186+
string(82) "reference to entity "utm_medium" for which no system identifier could be generated"
187+
}
188+
[7]=>
189+
array(3) {
190+
["line"]=>
191+
string(3) "307"
192+
["column"]=>
193+
string(3) "130"
194+
["message"]=>
195+
string(62) "general entity "utm_content" not defined and no default entity"
196+
}
197+
[8]=>
198+
array(3) {
199+
["line"]=>
200+
string(3) "307"
201+
["column"]=>
202+
string(3) "141"
203+
["message"]=>
204+
string(83) "reference to entity "utm_content" for which no system identifier could be generated"
205+
}
206+
[9]=>
207+
array(3) {
208+
["line"]=>
209+
string(3) "307"
210+
["column"]=>
211+
string(3) "149"
212+
["message"]=>
213+
string(63) "general entity "utm_campaign" not defined and no default entity"
214+
}
215+
}
216+
*/

docs/example.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?php
22

3-
include_once '../src/W3CValidator.php';
3+
include_once realpath(__DIR__ . '/../src/W3CValidator.php');
44

55
// Create a new validator object
6-
$validate = new W3CValidator('http://www.walla.co.il');
6+
$validate = new W3CValidator\W3CValidator('http://www.walla.co.il');
77

8-
var_dump($validate->getReport());
9-
10-
die();
8+
var_dump($validate->getReport());

0 commit comments

Comments
 (0)