+
+ /** export the PlFlagSet
+ */
+ public function export()
+ {
+ $array = array();
+ foreach ($this->values as $key=>$value) {
+ if ($value) {
+ $array[] = $key;
+ }
+ }
+ return $array;
+ }
+
+ /** format for XDB
+ */
+ public function format()
+ {
+ return XDB::escape($this->flags());
+ }
+
+
+ /** Build an iterator for this PlFlagSet.
+ */
+ public function iterate()
+ {
+ return PlIteratorUtils::fromArray($this->export(), 1, true);
+ }