| @@ 500-509 (lines=10) @@ | ||
| 497 | return (string) substr($scalar, 5); |
|
| 498 | case 0 === strpos($scalar, '! '): |
|
| 499 | return (int) self::parseScalar(substr($scalar, 2)); |
|
| 500 | case 0 === strpos($scalar, '!php/object:'): |
|
| 501 | if (self::$objectSupport) { |
|
| 502 | return unserialize(substr($scalar, 12)); |
|
| 503 | } |
|
| 504 | ||
| 505 | if (self::$exceptionOnInvalidType) { |
|
| 506 | throw new ParseException('Object support when parsing a YAML file has been disabled.'); |
|
| 507 | } |
|
| 508 | ||
| 509 | return; |
|
| 510 | case 0 === strpos($scalar, '!!php/object:'): |
|
| 511 | if (self::$objectSupport) { |
|
| 512 | return unserialize(substr($scalar, 13)); |
|
| @@ 510-519 (lines=10) @@ | ||
| 507 | } |
|
| 508 | ||
| 509 | return; |
|
| 510 | case 0 === strpos($scalar, '!!php/object:'): |
|
| 511 | if (self::$objectSupport) { |
|
| 512 | return unserialize(substr($scalar, 13)); |
|
| 513 | } |
|
| 514 | ||
| 515 | if (self::$exceptionOnInvalidType) { |
|
| 516 | throw new ParseException('Object support when parsing a YAML file has been disabled.'); |
|
| 517 | } |
|
| 518 | ||
| 519 | return; |
|
| 520 | case 0 === strpos($scalar, '!!float '): |
|
| 521 | return (float) substr($scalar, 8); |
|
| 522 | case ctype_digit($scalar): |
|