Initial commit
Working directory listing. Hardcoded sidebar template.
This commit is contained in:
36
source/lib/MediaListing/Source.class.php
Normal file
36
source/lib/MediaListing/Source.class.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user