| @@ 519-528 (lines=10) @@ | ||
| 516 | return (string) substr($scalar, 5); |
|
| 517 | case 0 === strpos($scalar, '! '): |
|
| 518 | return (int) self::parseScalar(substr($scalar, 2)); |
|
| 519 | case 0 === strpos($scalar, '!php/object:'): |
|
| 520 | if (self::$objectSupport) { |
|
| 521 | return unserialize(substr($scalar, 12)); |
|
| 522 | } |
|
| 523 | ||
| 524 | if (self::$exceptionOnInvalidType) { |
|
| 525 | throw new ParseException('Object support when parsing a YAML file has been disabled.'); |
|
| 526 | } |
|
| 527 | ||
| 528 | return; |
|
| 529 | case 0 === strpos($scalar, '!!php/object:'): |
|
| 530 | if (self::$objectSupport) { |
|
| 531 | return unserialize(substr($scalar, 13)); |
|
| @@ 529-538 (lines=10) @@ | ||
| 526 | } |
|
| 527 | ||
| 528 | return; |
|
| 529 | case 0 === strpos($scalar, '!!php/object:'): |
|
| 530 | if (self::$objectSupport) { |
|
| 531 | return unserialize(substr($scalar, 13)); |
|
| 532 | } |
|
| 533 | ||
| 534 | if (self::$exceptionOnInvalidType) { |
|
| 535 | throw new ParseException('Object support when parsing a YAML file has been disabled.'); |
|
| 536 | } |
|
| 537 | ||
| 538 | return; |
|
| 539 | case 0 === strpos($scalar, '!!float '): |
|
| 540 | return (float) substr($scalar, 8); |
|
| 541 | case ctype_digit($scalar): |
|