本文整理汇总了PHP中kXml::timeToInteger方法的典型用法代码示例。如果您正苦于以下问题:PHP kXml::timeToInteger方法的具体用法?PHP kXml::timeToInteger怎么用?PHP kXml::timeToInteger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kXml
的用法示例。
在下文中一共展示了kXml::timeToInteger方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseStrTTTime
private function parseStrTTTime($timeStr)
{
$matches = null;
if (preg_match('/(\\d+)s/', $timeStr)) {
return intval($matches[1]) * 1000;
}
return kXml::timeToInteger($timeStr);
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:8,代码来源:dfxpCaptionsContentManager.php
示例2: parseCuePoint
protected function parseCuePoint(SimpleXMLElement $scene)
{
if ($scene->getName() != 'scene-code-cue-point') {
return null;
}
$cuePoint = parent::parseCuePoint($scene);
if (!$cuePoint instanceof KalturaCodeCuePoint) {
return null;
}
if (isset($scene->sceneEndTime)) {
$cuePoint->endTime = kXml::timeToInteger($scene->sceneEndTime);
}
if (isset($scene->code)) {
$cuePoint->code = "{$scene->code}";
}
if (isset($scene->description)) {
$cuePoint->description = "{$scene->description}";
}
return $cuePoint;
}
示例3: parseCuePoint
protected function parseCuePoint(SimpleXMLElement $scene)
{
if ($scene->getName() != 'scene-annotation') {
return null;
}
$cuePoint = parent::parseCuePoint($scene);
if (!$cuePoint instanceof KalturaAnnotation) {
return null;
}
if (isset($scene->sceneEndTime)) {
$cuePoint->endTime = kXml::timeToInteger($scene->sceneEndTime);
}
if (isset($scene->sceneText)) {
$cuePoint->text = "{$scene->sceneText}";
}
if (isset($scene->parentId)) {
$cuePoint->parentId = "{$scene->parentId}";
} elseif (isset($scene->parent)) {
$cuePoint->parentId = $this->getCuePointId("{$scene->parent}");
}
return $cuePoint;
}
示例4: parseCuePoint
protected function parseCuePoint(SimpleXMLElement $scene)
{
if ($scene->getName() != 'scene-ad-cue-point') {
return null;
}
$cuePoint = parent::parseCuePoint($scene);
if (!$cuePoint instanceof KalturaAdCuePoint) {
return null;
}
if (isset($scene->sceneEndTime)) {
$cuePoint->endTime = kXml::timeToInteger($scene->sceneEndTime);
}
if (isset($scene->sceneTitle)) {
$cuePoint->title = "{$scene->sceneTitle}";
}
if (isset($scene->sourceUrl)) {
$cuePoint->sourceUrl = "{$scene->sourceUrl}";
}
$cuePoint->adType = "{$scene->adType}";
$cuePoint->protocolType = "{$scene->protocolType}";
return $cuePoint;
}
示例5: parseXml
public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
{
if ($scene->getName() != 'scene-ad-cue-point') {
return $cuePoint;
}
if (!$cuePoint) {
$cuePoint = kCuePointManager::parseXml($scene, $partnerId, new AdCuePoint());
}
if (!$cuePoint instanceof AdCuePoint) {
return null;
}
if (isset($scene->sceneEndTime)) {
$cuePoint->setEndTime(kXml::timeToInteger($scene->sceneEndTime));
}
if (isset($scene->sceneTitle)) {
$cuePoint->setName($scene->sceneTitle);
}
if (isset($scene->sourceUrl)) {
$cuePoint->setSourceUrl($scene->sourceUrl);
}
$cuePoint->setAdType($scene->adType);
$cuePoint->setSubType($scene->protocolType);
return $cuePoint;
}
示例6: parseXml
public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
{
if ($scene->getName() != 'scene-annotation') {
return $cuePoint;
}
if (!$cuePoint) {
$cuePoint = kCuePointManager::parseXml($scene, $partnerId, new Annotation());
}
if (!$cuePoint instanceof Annotation) {
return null;
}
$cuePoint->setEndTime(kXml::timeToInteger($scene->sceneEndTime));
if (isset($scene->sceneText)) {
$cuePoint->setText($scene->sceneText);
}
$parentCuePoint = null;
if (isset($scene->parentId)) {
$parentCuePoint = CuePointPeer::retrieveByPK($scene->parentId);
} elseif (isset($scene->parent)) {
$parentCuePoint = CuePointPeer::retrieveBySystemName($cuePoint->getEntryId(), $scene->parent);
}
if ($parentCuePoint) {
$cuePoint->setParentId($parentCuePoint->getId());
}
return $cuePoint;
}
示例7: parseXml
/**
* @param SimpleXMLElement $scene
* @param int $partnerId
* @param CuePoint $newCuePoint
* @return CuePoint
*/
public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $newCuePoint = null)
{
$cuePoint = null;
$entryId = $scene['entryId'];
$entry = entryPeer::retrieveByPK($entryId);
if (!$entry) {
throw new kCoreException("Entry [{$entryId}] not found", kCoreException::INVALID_ENTRY_ID);
}
if (isset($scene['sceneId']) && $scene['sceneId']) {
$cuePoint = CuePointPeer::retrieveByPK($scene['sceneId']);
}
if (!$cuePoint && isset($scene['systemName']) && $scene['systemName']) {
$cuePoint = CuePointPeer::retrieveBySystemName($entryId, $scene['systemName']);
}
if (!$cuePoint) {
$cuePoint = $newCuePoint;
}
$cuePoint->setPartnerId($partnerId);
$cuePoint->setStartTime(kXml::timeToInteger($scene->sceneStartTime));
$tags = array();
foreach ($scene->tags->children() as $tag) {
$value = "{$tag}";
if ($value) {
$tags[] = $value;
}
}
$cuePoint->setTags(implode(',', $tags));
$cuePoint->setEntryId($entryId);
if (isset($scene['systemName'])) {
$cuePoint->setSystemName($scene['systemName']);
}
return $cuePoint;
}
示例8: parseCuePoint
/**
* @param SimpleXMLElement $scene
* @return KalturaCuePoint
*/
protected function parseCuePoint(SimpleXMLElement $scene)
{
$cuePoint = $this->getNewInstance();
if (isset($scene['systemName']) && $scene['systemName']) {
$cuePoint->systemName = $scene['systemName'] . '';
}
$cuePoint->startTime = kXml::timeToInteger($scene->sceneStartTime);
$tags = array();
foreach ($scene->tags->children() as $tag) {
$value = "{$tag}";
if ($value) {
$tags[] = $value;
}
}
$cuePoint->tags = implode(',', $tags);
return $cuePoint;
}
示例9: parseXml
public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $cuePoint = null)
{
if ($scene->getName() != 'scene-code-cue-point') {
return $cuePoint;
}
if (!$cuePoint) {
$cuePoint = kCuePointManager::parseXml($scene, $partnerId, new CodeCuePoint());
}
if (!$cuePoint instanceof CodeCuePoint) {
return null;
}
if (isset($scene->sceneEndTime)) {
$cuePoint->setEndTime(kXml::timeToInteger($scene->sceneEndTime));
}
if (isset($scene->code)) {
$cuePoint->setName($scene->code);
}
if (isset($scene->description)) {
$cuePoint->setText($scene->description);
}
return $cuePoint;
}
示例10: parseXml
/**
* @param SimpleXMLElement $scene
* @param int $partnerId
* @param CuePoint $newCuePoint
* @return CuePoint
*/
public static function parseXml(SimpleXMLElement $scene, $partnerId, CuePoint $newCuePoint = null)
{
$cuePoint = null;
if (isset($scene['sceneId']) && $scene['sceneId']) {
$cuePoint = CuePointPeer::retrieveByPK($scene['sceneId']);
}
if (!$cuePoint && isset($scene['systemName']) && $scene['systemName']) {
$cuePoint = CuePointPeer::retrieveBySystemName($scene['entryId'], $scene['systemName']);
}
if (!$cuePoint) {
$cuePoint = $newCuePoint;
}
$cuePoint->setPartnerId($partnerId);
$cuePoint->setStartTime(kXml::timeToInteger($scene->sceneStartTime));
$tags = array();
foreach ($scene->tags->children() as $tag) {
$value = "{$tag}";
if ($value) {
$tags[] = $value;
}
}
$cuePoint->setTags(implode(',', $tags));
$cuePoint->setEntryId($scene['entryId']);
if (isset($scene['systemName'])) {
$cuePoint->setSystemName($scene['systemName']);
}
return $cuePoint;
}