ILIAS  Release_4_1_x_branch Revision 61804
 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)
 getMimeTypes ()
 setMimeTypes (array $mimeTypes)
 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()
 $mimeTypes = 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 46 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 59 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 90 of file class.ilMediaCastSettings.php.

References $defaultAccess.

{
}
ilMediaCastSettings::getMimeTypes ( )
Returns
array of mimetypes

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

References $mimeTypes.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilMediaCastSettings::getPurposeSuffixes ( )

get filetypes for purposes

public

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

References $purposeSuffixes.

ilMediaCastSettings::initStorage ( )
private

Init storage class (ilSetting) private.

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

References $mimeTypes, ilObjMediaCast\$purposes, ilObjMediaObject\getExt2MimeMap(), setDefaultAccess(), and setMimeTypes().

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");
require_once 'Services/MediaObjects/classes/class.ilObjMediaObject.php';
$mimeTypes = array_unique(array_values(ilObjMediaObject::getExt2MimeMap()));
sort($mimeTypes);
}

+ 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 134 of file class.ilMediaCastSettings.php.

References setDefaultAccess(), and setMimeTypes().

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"));
if ($this->storage->get("mimetypes"))
$this->setMimeTypes(explode(",", $this->storage->get("mimetypes")));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMediaCastSettings::save ( )

save

public

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

References getMimeTypes().

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

+ Here is the call graph for this function:

ilMediaCastSettings::setDefaultAccess (   $value)

Definition at line 94 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::setMimeTypes ( array  $mimeTypes)
Parameters
unknown_type$mimeTypes

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

References $mimeTypes.

Referenced by initStorage(), and read().

{
$this->mimeTypes = $mimeTypes;
}

+ Here is the caller graph for this function:

ilMediaCastSettings::setPurposeSuffixes (   $purpose_filetypes)

set filetypes for purposes

public

Definition at line 74 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::$mimeTypes = array()
private

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

Referenced by getMimeTypes(), initStorage(), and setMimeTypes().

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: