-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 'master'
Develop See merge request ILIAS/Plugins/ViMP!16
- Loading branch information
Showing
1,107 changed files
with
480,155 additions
and
91,542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
/** | ||
* Class xvmpChapters | ||
* | ||
* @author Theodor Truffer <[email protected]> | ||
*/ | ||
class xvmpChapters extends xvmpObject { | ||
|
||
/** | ||
* @param $id | ||
* | ||
* @return array | ||
*/ | ||
public static function getObjectAsArray($id) { | ||
$key = self::class . '-' . $id; | ||
$existing = xvmpCacheFactory::getInstance()->get($key); | ||
if ($existing) { | ||
xvmpCurlLog::getInstance()->write('CACHE: used cached: ' . $key, xvmpCurlLog::DEBUG_LEVEL_2); | ||
return $existing; | ||
} | ||
|
||
$array = xvmpRequest::getChapters($id)->getResponseArray(); | ||
|
||
self::cache($key, $array); | ||
|
||
return $array; | ||
} | ||
|
||
|
||
/** | ||
* @param $identifier | ||
* @param array $object | ||
* @param null $ttl | ||
*/ | ||
public static function cache($identifier, $object, $ttl = null) { | ||
parent::cache($identifier, $object, xvmpConf::getConfig(xvmpConf::F_CACHE_TTL_VIDEOS)); | ||
} | ||
|
||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $lang; | ||
/** | ||
* @var array | ||
*/ | ||
protected $chapters; | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getLang() { | ||
return $this->lang; | ||
} | ||
|
||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getChapters() { | ||
return $this->chapters; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
/** | ||
* Class xvmpConfig | ||
* | ||
* @author Theodor Truffer <[email protected]> | ||
*/ | ||
class xvmpConfig extends xvmpObject { | ||
|
||
/** | ||
* @param $id | ||
* | ||
* @return array | ||
*/ | ||
public static function getObjectAsArray($id) { | ||
$key = self::class . '-' . $id; | ||
$existing = xvmpCacheFactory::getInstance()->get($key); | ||
if ($existing) { | ||
xvmpCurlLog::getInstance()->write('CACHE: used cached: ' . $key, xvmpCurlLog::DEBUG_LEVEL_2); | ||
return $existing; | ||
} | ||
|
||
$array = xvmpRequest::config($id)->getResponseArray()['config']; | ||
$array['id'] = $id; | ||
|
||
self::cache($key, $array); | ||
|
||
return $array; | ||
} | ||
|
||
|
||
/** | ||
* @param $identifier | ||
* @param array $object | ||
* @param null $ttl | ||
*/ | ||
public static function cache($identifier, $object, $ttl = null) { | ||
parent::cache($identifier, $object, xvmpConf::getConfig(xvmpConf::F_CACHE_TTL_CONFIG)); | ||
} | ||
|
||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $name; | ||
/** | ||
* @var string | ||
*/ | ||
protected $value; | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName() { | ||
return $this->name; | ||
} | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getValue() { | ||
return $this->value; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.