ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMediaAnalyzer.php
Go to the documentation of this file.
1<?php
2
25{
26 protected array $file_info;
27 protected getID3 $getid3;
28 public string $file;
29
30 public function __construct()
31 {
32 $this->getid3 = new getID3();
33 }
34
38 public function setFile(string $a_file): void
39 {
40 $this->file = $a_file;
41 }
42
43 public function getFile(): string
44 {
45 return $this->file;
46 }
47
51 public function getPlaytimeString(): string
52 {
53 return $this->file_info["playtime_string"];
54 }
55
56 public function getPlaytimeSeconds(): int
57 {
58 return (int) ($this->file_info["playtime_seconds"] ?? 0);
59 }
60
64 public function analyzeFile(): void
65 {
66 $this->file_info = $this->getid3->analyze($this->getFile());
67 }
68}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFile(string $a_file)
Set Full File Path.
getPlaytimeString()
Get PlaytimeString.
analyzeFile()
Analyze current file.