ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMediaCastSettings Class Reference

Stores all mediacast relevant settings. More...

+ Collaboration diagram for ilMediaCastSettings:

Public Member Functions

 setPurposeSuffixes ($purpose_filetypes)
 set filetypes for purposes
 getPurposeSuffixes ()
 get filetypes for purposes
 getDefaultAccess ()
 setDefaultAccess ($value)
 save ()
 save

Static Public Member Functions

static _getInstance ()
 get singleton instance

Private Member Functions

 __construct ()
 singleton contructor
 read ()
 Read settings.
 initStorage ()
 Init storage class (ilSetting) private.

Private Attributes

 $defaultAccess = "users"
 $purposeSuffixes = array()

Static Private Attributes

static $instance = null

Detailed Description

Stores all mediacast relevant settings.

Author
Roland Küstermann rkues.nosp@m.term.nosp@m.ann@m.nosp@m.ps.d.nosp@m.e
Version
$Id$

Definition at line 33 of file class.ilMediaCastSettings.php.

Constructor & Destructor Documentation

ilMediaCastSettings::__construct ( )
private

singleton contructor

private

Definition at line 45 of file class.ilMediaCastSettings.php.

References initStorage(), and read().

{
$this->initStorage();
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

static ilMediaCastSettings::_getInstance ( )
static

get singleton instance

public

Definition at line 58 of file class.ilMediaCastSettings.php.

References $instance.

Referenced by ilObjMediaCastGUI\ilObjMediaCastGUI(), and ilObjMediaCastSettingsGUI\initMediaCastSettings().

{
if(self::$instance)
{
}
return self::$instance = new ilMediaCastSettings();
}

+ Here is the caller graph for this function:

ilMediaCastSettings::getDefaultAccess ( )

Definition at line 89 of file class.ilMediaCastSettings.php.

References $defaultAccess.

{
}
ilMediaCastSettings::getPurposeSuffixes ( )

get filetypes for purposes

public

Definition at line 84 of file class.ilMediaCastSettings.php.

References $purposeSuffixes.

ilMediaCastSettings::initStorage ( )
private

Init storage class (ilSetting) private.

Definition at line 132 of file class.ilMediaCastSettings.php.

References ilObjMediaCast\$purposes, and setDefaultAccess().

Referenced by __construct().

{
include_once('./Services/Administration/classes/class.ilSetting.php');
$this->storage = new ilSetting('mcst');
include_once('./Modules/MediaCast/classes/class.ilObjMediaCast.php');
$this->purposeSuffixes = array_flip(ilObjMediaCast::$purposes);
$this->purposeSuffixes["Standard"] = array("mp3","flv","mp4","m4v","mov","wmv","gif","png");
$this->purposeSuffixes["AudioPortable"] = array("mp3");
$this->purposeSuffixes["VideoPortable"] = array("mp4","m4v","mov");
$this->setDefaultAccess("users");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMediaCastSettings::read ( )
private

Read settings.

private

Parameters

Definition at line 117 of file class.ilMediaCastSettings.php.

References setDefaultAccess().

Referenced by __construct().

{
foreach ($this->purposeSuffixes as $purpose => $filetypes) {
if ($this->storage->get($purpose."_types") != false) {
$this->purposeSuffixes[$purpose] = explode(",",$this->storage->get($purpose."_types"));
}
}
$this->setDefaultAccess($this->storage->get("defaultaccess"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMediaCastSettings::save ( )

save

public

Definition at line 102 of file class.ilMediaCastSettings.php.

{
foreach ($this->purposeSuffixes as $purpose => $filetypes) {
$this->storage->set($purpose . "_types", implode(",",$filetypes));
}
$this->storage->set("defaultaccess",$this->defaultAccess);
}
ilMediaCastSettings::setDefaultAccess (   $value)

Definition at line 93 of file class.ilMediaCastSettings.php.

Referenced by initStorage(), and read().

{
$this->defaultAccess = $value == "users" ? "users" : "public";
}

+ Here is the caller graph for this function:

ilMediaCastSettings::setPurposeSuffixes (   $purpose_filetypes)

set filetypes for purposes

public

Definition at line 73 of file class.ilMediaCastSettings.php.

{
$this->purposeSuffixes = $purpose_filetypes;
}

Field Documentation

ilMediaCastSettings::$defaultAccess = "users"
private

Definition at line 36 of file class.ilMediaCastSettings.php.

Referenced by getDefaultAccess().

ilMediaCastSettings::$instance = null
staticprivate

Definition at line 35 of file class.ilMediaCastSettings.php.

Referenced by _getInstance().

ilMediaCastSettings::$purposeSuffixes = array()
private

Definition at line 37 of file class.ilMediaCastSettings.php.

Referenced by getPurposeSuffixes().


The documentation for this class was generated from the following file: