original_string: public static function instance($page = null) {
          // Use the passed $page if given, otherwise the $PAGE global.
          if (!$page) {
              global $PAGE;
              $page = $PAGE;
          }
          if (self::$instance === null || ($page && self::$instance->page !== $page)) {
              self::$instance = new self($page);
          }
          return self::$instance;
      }
code: public static function instance($page = null) {
          // Use the passed $page if given, otherwise the $PAGE global.
          if (!$page) {
              global $PAGE;
              $page = $PAGE;
          }
          if (self::$instance === null || ($page && self::$instance->page !== $page)) {
              self::$instance = new self($page);
          }
          return self::$instance;
      }
code_tokens: public static function instance ( $ page = null ) { // Use the passed $page if given, otherwise the $PAGE global. if ( ! $ page ) { global $ PAGE ; $ page = $ PAGE ; } if ( self :: $ instance === null || ( $ page && self :: $ instance -> page !== $ page ) ) { self :: $ instance = new self ( $ page ) ; } return self :: $ instance ; }
docstring: Returns a singleton instance of a manager
  
  Note as of Moodle 3.3, this will call setup for you.
  
  @return core_media_manager
docstring_tokens: Returns a singleton instance of a manager