36 lines
628 B
PHP
36 lines
628 B
PHP
<?php
|
|
|
|
class MediaListing_Source {
|
|
|
|
protected $name;
|
|
protected $path;
|
|
protected $root;
|
|
|
|
public function __construct($name, $path, $scan = true) {
|
|
$this->name = $name;
|
|
$this->path = $path;
|
|
|
|
if ($scan) {
|
|
$this->scan();
|
|
}
|
|
}
|
|
|
|
protected function scan() {
|
|
$this->root = MediaListing_FileObject::create($this->path);
|
|
}
|
|
|
|
public function name() {
|
|
return $this->name;
|
|
}
|
|
|
|
public function path() {
|
|
return $this->path();
|
|
}
|
|
|
|
public function root() {
|
|
return $this->root;
|
|
}
|
|
|
|
}
|
|
|
|
?>
|