2009-06-30 10:46:00 +00:00
|
|
|
<?php
|
2009-07-01 06:09:17 +00:00
|
|
|
// $Header$
|
2009-06-30 10:46:00 +00:00
|
|
|
|
|
|
|
/**
|
2009-07-01 06:09:17 +00:00
|
|
|
* Classes and functions for the template engine.
|
|
|
|
*
|
|
|
|
* @author The phpLDAPadmin development team
|
2009-06-30 10:46:00 +00:00
|
|
|
* @package phpLDAPadmin
|
2009-07-01 06:09:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents an attribute whose values are binary
|
2009-06-30 10:46:00 +00:00
|
|
|
*
|
2009-07-01 06:09:17 +00:00
|
|
|
* @package phpLDAPadmin
|
|
|
|
* @subpackage Templates
|
2009-06-30 10:46:00 +00:00
|
|
|
*/
|
|
|
|
class BinaryAttribute extends Attribute {
|
|
|
|
protected $filepaths;
|
|
|
|
protected $filenames;
|
|
|
|
|
2009-07-01 06:09:17 +00:00
|
|
|
public function __construct($name,$values,$server_id,$source=null) {
|
|
|
|
parent::__construct($name,$values,$server_id,$source);
|
2009-06-30 10:46:00 +00:00
|
|
|
|
|
|
|
$this->filepaths = array();
|
|
|
|
$this->filenames = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFileNames() {
|
|
|
|
return $this->filenames;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFileName($i) {
|
|
|
|
if (isset($this->filenames[$i])) return $this->filenames[$i];
|
|
|
|
else return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addFileName($name, $i = -1) {
|
|
|
|
if ($i < 0) {
|
|
|
|
$this->filenames[] = $name;
|
|
|
|
} else {
|
|
|
|
$this->filenames[$i] = $name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFilePaths() {
|
|
|
|
return $this->filepaths;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFilePath($i) {
|
|
|
|
if (isset($this->filepaths[$i])) return $this->filepaths[$i];
|
|
|
|
else return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addFilePath($path, $i = -1) {
|
|
|
|
if ($i < 0) {
|
|
|
|
$this->filepaths[] = $path;
|
|
|
|
} else {
|
|
|
|
$this->filepaths[$i] = $path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|