projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add interface PlIteraface and the corresponding abstract class
[platal.git]
/
classes
/
plflagset.php
diff --git
a/classes/plflagset.php
b/classes/plflagset.php
index
e18adcf
..
28c7add
100644
(file)
--- a/
classes/plflagset.php
+++ b/
classes/plflagset.php
@@
-21,7
+21,7
@@
/** class for describing flags
*/
/** class for describing flags
*/
-class PlFlagSet
+class PlFlagSet
implements XDBFormat
{
/** string that holds the PlFlagSet */
private $values = array();
{
/** string that holds the PlFlagSet */
private $values = array();
@@
-39,7
+39,9
@@
class PlFlagSet
$this->sep = $sep;
$splitted = explode($sep, $flags);
foreach ($splitted as $part) {
$this->sep = $sep;
$splitted = explode($sep, $flags);
foreach ($splitted as $part) {
- $this->values[$part] = true;
+ if (!empty($part)) {
+ $this->values[$part] = true;
+ }
}
}
}
}
@@
-118,6
+120,14
@@
class PlFlagSet
}
return $flags;
}
}
return $flags;
}
+
+
+ /** format for XDB
+ */
+ public function format()
+ {
+ return XDB::escape($this->flags());
+ }
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: