Commit fb73f60a authored by John Okely's avatar John Okely
Browse files

MDL-58361 media: Make core_meda_manager constructor private

parent 2553d67c
......@@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die();
* @author 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_media_manager {
final class core_media_manager {
/**
* Option: Disable text link fallback.
*
......@@ -95,10 +95,10 @@ class core_media_manager {
private $embeddablemarkers;
/** @var core_media_manager caches a singleton instance */
static protected $instance;
static private $instance;
/** @var moodle_page page this instance was initialised for */
protected $page;
private $page;
/**
* Returns a singleton instance of a manager
......@@ -125,7 +125,7 @@ class core_media_manager {
* @param moodle_page $page The page we are going to add requirements to.
* @see core_media_manager::instance()
*/
protected function __construct($page) {
private function __construct($page) {
if ($page) {
$this->page = $page;
$players = $this->get_players();
......@@ -169,7 +169,7 @@ class core_media_manager {
*
* @return core_media_player[] Array of core_media_player objects in rank order
*/
protected function get_players() {
private function get_players() {
// Save time by only building the list once.
if (!$this->players) {
$sortorder = \core\plugininfo\media::get_enabled_plugins();
......@@ -298,7 +298,7 @@ class core_media_manager {
* @param array $options Options array
* @return string HTML code for embed
*/
protected function fallback_to_link($urls, $name, $options) {
private function fallback_to_link($urls, $name, $options) {
// If link is turned off, return empty.
if (!empty($options[self::OPTION_NO_LINK])) {
return '';
......
......@@ -3,3 +3,4 @@ information provided here is intended especially for developers.
=== 3.3 ===
* core_media_manager setup() is now deprecated as it is now called when initialising core_media_manager::instance().
* core_media_manager is now final. Do not extend core_media_manager, instead create a media plugin.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment