IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 72 | 72 | */ |
| 73 | 73 | protected $endpoints = array(); |
| 74 | 74 | |
| | 75 | /** |
| | 76 | * The route map is an associative array with path regexes as the keys. The |
| | 77 | * value is an indexed array with the callback function/method as the first |
| | 78 | * item, and a bitmask of HTTP methods as the second item (see the class |
| | 79 | * constants). |
| | 80 | * $endpoints is the raw endpoints |
| | 81 | * $route_map is the parsed, filtered and sanitized map from a regex to an endpoint. |
| | 82 | * |
| | 83 | * @access protected |
| | 84 | * @var array Route map of the routes |
| | 85 | */ |
| | 86 | protected $route_map = array(); |
| | 87 | |
| 75 | 88 | /** |
| 76 | 89 | * Options defined for the routes. |
| 77 | 90 | * |
| … |
… |
|
| 673 | 686 | } |
| 674 | 687 | } |
| 675 | 688 | |
| | 689 | /** |
| | 690 | * Retrieves the internally stored route map. |
| | 691 | * |
| | 692 | * @access public |
| | 693 | * |
| | 694 | * @return array Route map of the routes. |
| | 695 | */ |
| | 696 | public function get_route_map() { |
| | 697 | return $this->route_map; |
| | 698 | } |
| | 699 | |
| | 700 | /** |
| | 701 | * Sets the internally stored route map. |
| | 702 | * |
| | 703 | * @access public |
| | 704 | * |
| | 705 | * @param array $route_map Route map of the routes. |
| | 706 | */ |
| | 707 | public function set_route_map( $route_map ) { |
| | 708 | $this->route_map = $route_map; |
| | 709 | } |
| | 710 | |
| 676 | 711 | /** |
| 677 | 712 | * Retrieves the route map. |
| 678 | 713 | * |
| | 714 | * Caches the results internally. |
| | 715 | * see $route_map |
| | 716 | * |
| 679 | 717 | * The route map is an associative array with path regexes as the keys. The |
| 680 | 718 | * value is an indexed array with the callback function/method as the first |
| 681 | 719 | * item, and a bitmask of HTTP methods as the second item (see the class |
| … |
… |
|
| 695 | 733 | * `'/path/regex' => array( array( $callback, $bitmask ), ...)`. |
| 696 | 734 | */ |
| 697 | 735 | public function get_routes() { |
| | 736 | $endpoints = $this->get_route_map(); |
| | 737 | |
| | 738 | if ( ! empty( $endpoints ) ) { |
| | 739 | return $endpoints; |
| | 740 | } |
| 698 | 741 | |
| 699 | 742 | /** |
| 700 | 743 | * Filters the array of available endpoints. |
| … |
… |
|
| 756 | 799 | } |
| 757 | 800 | } |
| 758 | 801 | } |
| | 802 | $this->set_route_map( $endpoints ); |
| 759 | 803 | |
| 760 | 804 | return $endpoints; |
| 761 | 805 | } |