equal
deleted
inserted
replaced
3 * SimplePie |
3 * SimplePie |
4 * |
4 * |
5 * A PHP-Based RSS and Atom Feed Framework. |
5 * A PHP-Based RSS and Atom Feed Framework. |
6 * Takes the hard work out of managing a complete RSS/Atom solution. |
6 * Takes the hard work out of managing a complete RSS/Atom solution. |
7 * |
7 * |
8 * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors |
8 * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors |
9 * All rights reserved. |
9 * All rights reserved. |
10 * |
10 * |
11 * Redistribution and use in source and binary forms, with or without modification, are |
11 * Redistribution and use in source and binary forms, with or without modification, are |
12 * permitted provided that the following conditions are met: |
12 * permitted provided that the following conditions are met: |
13 * |
13 * |
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
33 * POSSIBILITY OF SUCH DAMAGE. |
33 * POSSIBILITY OF SUCH DAMAGE. |
34 * |
34 * |
35 * @package SimplePie |
35 * @package SimplePie |
36 * @version 1.3.1 |
36 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue |
37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue |
|
38 * @author Ryan Parman |
37 * @author Ryan Parman |
39 * @author Geoffrey Sneddon |
38 * @author Sam Sneddon |
40 * @author Ryan McCue |
39 * @author Ryan McCue |
41 * @link http://simplepie.org/ SimplePie |
40 * @link http://simplepie.org/ SimplePie |
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
43 */ |
42 */ |
44 |
43 |
116 if (isset($this->data[$this->position])) |
115 if (isset($this->data[$this->position])) |
117 { |
116 { |
118 $this->consumed .= $this->data[$this->position]; |
117 $this->consumed .= $this->data[$this->position]; |
119 return $this->data[$this->position++]; |
118 return $this->data[$this->position++]; |
120 } |
119 } |
121 else |
120 |
122 { |
121 return false; |
123 return false; |
|
124 } |
|
125 } |
122 } |
126 |
123 |
127 /** |
124 /** |
128 * Consume a range of characters |
125 * Consume a range of characters |
129 * |
126 * |
138 $data = substr($this->data, $this->position, $len); |
135 $data = substr($this->data, $this->position, $len); |
139 $this->consumed .= $data; |
136 $this->consumed .= $data; |
140 $this->position += $len; |
137 $this->position += $len; |
141 return $data; |
138 return $data; |
142 } |
139 } |
143 else |
140 |
144 { |
141 return false; |
145 return false; |
|
146 } |
|
147 } |
142 } |
148 |
143 |
149 /** |
144 /** |
150 * Unconsume one byte |
145 * Unconsume one byte |
151 * |
146 * |
166 { |
161 { |
167 switch ($this->consume()) |
162 switch ($this->consume()) |
168 { |
163 { |
169 case "\x09": |
164 case "\x09": |
170 case "\x0A": |
165 case "\x0A": |
171 case "\x0B": |
|
172 case "\x0B": |
166 case "\x0B": |
173 case "\x0C": |
167 case "\x0C": |
174 case "\x20": |
168 case "\x20": |
175 case "\x3C": |
169 case "\x3C": |
176 case "\x26": |
170 case "\x26": |
612 } |
606 } |
613 break; |
607 break; |
614 } |
608 } |
615 } |
609 } |
616 } |
610 } |
617 |
|