Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +----------------------------------------------------------------------+
4
// | PHP Version 4                                                        |
5
// +----------------------------------------------------------------------+
6
// | Copyright (c) 1997-2003 The PHP Group                                |
7
// +----------------------------------------------------------------------+
8
// | This source file is subject to version 2.02 of the PHP license,      |
9
// | that is bundled with this package in the file LICENSE, and is        |
10
// | available at through the world-wide-web at                           |
11
// | http://www.php.net/license/2_02.txt.                                 |
12
// | If you did not receive a copy of the PHP license and are unable to   |
13
// | obtain it through the world-wide-web, please send a note to          |
14
// | license@php.net so we can mail you a copy immediately.               |
15
// +----------------------------------------------------------------------+
16
// | Authors: Wolfram Kriesing <wolfram@kriesing.de>                      |
17
// +----------------------------------------------------------------------+
18
//
19
//  $Id: Common.php,v 1.35.2.2 2009/03/12 17:19:52 dufuz Exp $
20
 
21
require_once 'Tree/Tree.php';
22
require_once 'Tree/Error.php';
23
 
24
/**
25
 * common tree class, implements common functionality
26
 *
27
 *
28
 * @access     public
29
 * @author     Wolfram Kriesing <wolfram@kriesing.de>
30
 * @version    2001/06/27
31
 * @package    Tree
32
 */
33
class Tree_Common
34
{
35
     /**
36
     * @var array   you need to overwrite this array and give the keys/
37
     *              that are allowed
38
     */
39
    var $_forceSetOption = false;
40
 
41
    /**
42
     * put proper value-keys are given in each class, depending
43
     * on the implementation only some options are needed or allowed,
44
     * see the classes which extend this one
45
     *
46
     * @access public
47
     * @var    array   saves the options passed to the constructor
48
     */
49
    var $options =  array();
50
 
51
 
52
    // {{{ getChildId()
53
 
54
    /**
55
     * @version    2002/01/18
56
     * @access     public
57
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
58
     */
59
    function getChildId($id)
60
    {
61
        $child = $this->getChild($id);
62
        return $child['id'];
63
    }
64
 
65
    // }}}
66
    // {{{ getChildrenIds()
67
 
68
    /**
69
     * get the ids of the children of the given element
70
     *
71
     * @version 2002/02/06
72
     * @access  public
73
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
74
     * @param   integer ID of the element that the children shall be
75
     *                  retreived for
76
     * @param   integer how many levels deep into the tree
77
     * @return  mixed   an array of all the ids of the children of the element
78
     *                  with id=$id, or false if there are no children
79
     */
80
    function getChildrenIds($id, $levels = 1)
81
    {
82
        // returns false if no children exist
83
        if (!($children = $this->getChildren($id, $levels))) {
84
            return array();
85
        }
86
        // return an empty array, if you want to know
87
        // if there are children, use hasChildren
88
        if ($children && sizeof($children)) {
89
            foreach ($children as $aChild) {
90
                $childrenIds[] = $aChild['id'];
91
            }
92
        }
93
 
94
        return $childrenIds;
95
    }
96
 
97
    // }}}
98
    // {{{ getAllChildren()
99
 
100
    /**
101
     * gets all the children and grand children etc.
102
     *
103
     * @version 2002/09/30
104
     * @access  public
105
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
106
     * @param   integer ID of the element that the children shall be
107
     *                  retreived for
108
     *
109
     * @return  mixed   an array of all the children of the element with
110
     *                  id=$id, or false if there are no children
111
     */
112
     // FIXXXME remove this method and replace it by getChildren($id,0)
113
    function getAllChildren($id)
114
    {
115
        $retChildren = false;
116
        if ($children = $this->hasChildren($id)) {
117
            $retChildren = $this->_getAllChildren($id);
118
        }
119
        return $retChildren;
120
    }
121
 
122
    // }}}
123
    // {{{ _getAllChildren()
124
 
125
    /**
126
     * this method gets all the children recursively
127
     *
128
     * @see getAllChildren()
129
     * @version 2002/09/30
130
     * @access  public
131
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
132
     * @param   integer ID of the element that the children shall be
133
     *                  retreived for
134
     *
135
     * @return  mixed   an array of all the ids of the children of the element
136
     *                  with id=$id, or false if there are no children
137
     */
138
    function &_getAllChildren($id)
139
    {
140
        $retChildren = array();
141
        if ($children = $this->getChildren($id)) {
142
            foreach ($children as $key => $aChild) {
143
                $retChildren[] = &$children[$key];
144
                $retChildren = array_merge($retChildren,
145
                        $this->_getAllChildren($aChild['id']));
146
            }
147
        }
148
        return $retChildren;
149
    }
150
 
151
    // }}}
152
    // {{{ getAllChildrenIds()
153
 
154
    /**
155
     * gets all the children-ids and grand children-ids
156
     *
157
     * @version 2002/09/30
158
     * @access  public
159
     * @author  Kriesing <wolfram@kriesing.de>
160
     * @param   integer ID of the element that the children shall
161
     *          be retreived for
162
     *
163
     * @return  mixed   an array of all the ids of the children of the element
164
     *                  with id=$id,
165
     *                  or false if there are no children
166
     */
167
    function getAllChildrenIds($id)
168
    {
169
        $childrenIds = array();
170
        if ($allChildren = $this->getAllChildren($id)) {
171
            $childrenIds = array();
172
            foreach ($allChildren as $aNode) {
173
                $childrenIds[] = $aNode['id'];
174
            }
175
        }
176
        return $childrenIds;
177
    }
178
 
179
    // }}}
180
    // {{{ getParentId()
181
 
182
    /**
183
     * get the id of the parent for the given element
184
     *
185
     * @version 2002/01/18
186
     * @access  public
187
     * @param   integer the id of the element for which the parentId
188
     *                  shall be retreived
189
     * @author Wolfram Kriesing <wolfram@kriesing.de>
190
     */
191
    function getParentId($id)
192
    {
193
        $parent = $this->getParent($id);
194
        return $parent['id'];
195
    }
196
 
197
    // }}}
198
    // {{{ getParents()
199
 
200
    /**
201
     * this gets all the preceeding nodes, the parent and it's parent and so on
202
     *
203
     * @version 2002/08/19
204
     * @access  public
205
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
206
     * @param   integer the id of the element for which the parentId shall
207
     *                  be retreived
208
     * @return  array   of the parent nodes including the node with id $id
209
     */
210
    function getParents($id)
211
    {
212
        $path = $this->getPath($id);
213
        $parents = array();
214
        if (sizeof($path)) {
215
            foreach($path as $aNode) {
216
                $parents[] = $aNode;
217
            }
218
        }
219
        return $parents;
220
    }
221
 
222
    // }}}
223
    // {{{ getParentsIds()
224
 
225
    /**
226
     * get the ids of the parents and all it's parents and so on
227
     * it simply returns the ids of the elements returned by getParents()
228
     *
229
     * @see getParents()
230
     * @version 2002/08/19
231
     * @access  public
232
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
233
     * @param   integer $id the id of the element for which the parentId
234
     *          shall be retreived
235
     *
236
     * @return     array   of the ids
237
     */
238
    function getParentsIds($id)
239
    {
240
        $parents = $this->getParents($id);
241
        $parentsIds = array();
242
        if (sizeof($parents)) {
243
            foreach($parents as $aNode) {
244
                $parentsIds[] = $aNode['id'];
245
            }
246
        }
247
        return $parentsIds;
248
    }
249
 
250
    // }}}
251
    // {{{ getNextId()
252
 
253
    /**
254
     * @version    2002/01/18
255
     * @access     public
256
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
257
     */
258
    function getNextId($id)
259
    {
260
        $next = $this->getNext($id);
261
        return $next['id'];
262
    }
263
 
264
    // }}}
265
    // {{{ getPreviousId()
266
 
267
    /**
268
     * @version    2002/01/18
269
     * @access     public
270
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
271
     */
272
    function getPreviousId($id)
273
    {
274
        $previous = $this->getPrevious($id);
275
        return $previous['id'];
276
    }
277
 
278
    // }}}
279
    // {{{ getLeftId()
280
 
281
    /**
282
     * @version    2002/01/18
283
     * @access     public
284
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
285
     */
286
    function getLeftId($id)
287
    {
288
        $left = $this->getLeft($id);
289
        return $left['id'];
290
    }
291
 
292
    // }}}
293
    // {{{ getRightId()
294
 
295
    /**
296
     * @version    2002/01/18
297
     * @access     public
298
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
299
     */
300
    function getRightId($id)
301
    {
302
        $right = $this->getRight($id);
303
        return $right['id'];
304
    }
305
 
306
    // }}}
307
    // {{{ getFirstRootId()
308
 
309
    /**
310
     * @version    2002/04/16
311
     * @access     public
312
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
313
     */
314
    function getFirstRootId()
315
    {
316
        $firstRoot = $this->getFirstRoot();
317
        return $firstRoot['id'];
318
    }
319
 
320
    // }}}
321
    // {{{ getRootId()
322
 
323
    /**
324
     * @version    2002/04/16
325
     * @access     public
326
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
327
     */
328
    function getRootId()
329
    {
330
        $firstRoot = $this->getRoot();
331
        return $firstRoot['id'];
332
    }
333
 
334
    // }}}
335
    // {{{ getPathAsString()
336
 
337
    /**
338
     * returns the path as a string
339
     *
340
     * @access  public
341
     * @version 2002/03/28
342
     * @access  public
343
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
344
     * @param   mixed   $id     the id of the node to get the path for
345
     * @param   integer If offset is positive, the sequence will
346
     *                  start at that offset in the array .  If
347
     *                  offset is negative, the sequence will start that far
348
     *                  from the end of the array.
349
     * @param   integer If length is given and is positive, then
350
     *                  the sequence will have that many elements in it. If
351
     *                  length is given and is negative then the
352
     *                  sequence will stop that many elements from the end of
353
     *                  the array. If it is omitted, then the sequence will
354
     *                  have everything from offset up until the end
355
     *                  of the array.
356
     * @param   string  you can tell the key the path shall be used to be
357
     *                  constructed with i.e. giving 'name' (=default) would
358
     *                  use the value of the $element['name'] for the node-name
359
     *                  (thanks to Michael Johnson).
360
     *
361
     * @return  array   this array contains all elements from the root
362
     *                  to the element given by the id
363
     */
364
    function getPathAsString($id, $seperator = '/',
365
                                $offset = 0, $length = 0, $key = 'name')
366
    {
367
        $path = $this->getPath($id);
368
        foreach ($path as $aNode) {
369
            $pathArray[] = $aNode[$key];
370
        }
371
 
372
        if ($offset) {
373
            if ($length) {
374
                $pathArray = array_slice($pathArray, $offset, $length);
375
            } else {
376
                $pathArray = array_slice($pathArray, $offset);
377
            }
378
        }
379
 
380
        $pathString = '';
381
        if (sizeof($pathArray)) {
382
            $pathString = implode($seperator, $pathArray);
383
        }
384
        return $pathString;
385
    }
386
 
387
    // }}}
388
 
389
 
390
    //
391
    //  abstract methods, those should be overwritten by the implementing class
392
    //
393
 
394
    // {{{ getPath()
395
 
396
    /**
397
     * gets the path to the element given by its id
398
     *
399
     * @abstract
400
     * @version 2001/10/10
401
     * @access  public
402
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
403
     * @param   mixed   $id     the id of the node to get the path for
404
     * @return  array   this array contains all elements from the root
405
     *                  to the element given by the id
406
     */
407
    function getPath($id)
408
    {
409
        return $this->_raiseError(TREE_ERROR_NOT_IMPLEMENTED,
410
                __FUNCTION__, __LINE__);
411
    }
412
 
413
    // }}}
414
    // {{{ _preparePath()
415
 
416
    /**
417
     * gets the path to the element given by its id
418
     *
419
     * @version 2003/05/11
420
     * @access  private
421
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
422
     * @param   mixed   $id     the id of the node to get the path for
423
     * @return  array   this array contains the path elements and the sublevels
424
     *                  to substract if no $cwd has been given.
425
     */
426
    function _preparePath($path, $cwd = '/', $separator = '/'){
427
        $elems = explode($separator, $path);
428
        $cntElems = sizeof($elems);
429
        // beginning with a slash
430
        if (empty($elems[0])) {
431
            $beginSlash = true;
432
            array_shift($elems);
433
            $cntElems--;
434
        }
435
        // ending with a slash
436
        if (empty($elems[$cntElems-1])) {
437
            $endSlash = true;
438
            array_pop($elems);
439
            $cntElems--;
440
        }
441
        // Get the real path, and the levels
442
        // to substract if required
443
        $down = 0;
444
        while ($elems[0] == '..') {
445
            array_shift($elems);
446
            $down++;
447
        }
448
        if ($down >= 0 && $cwd == '/') {
449
            $down = 0;
450
            $_elems = array();
451
            $sublevel = 0;
452
            $_elems = array();
453
        } else {
454
            list($_elems, $sublevel) = $this->_preparePath($cwd);
455
        }
456
        $i = 0;
457
        foreach($elems as $val){
458
            if (trim($val) == '') {
459
                return $this->_raiseError(TREE_ERROR_INVALID_PATH,
460
                            __FUNCTION__, __LINE__);
461
            }
462
            if ($val == '..') {
463
                 if ($i == 0) {
464
                    $down++;
465
                 } else {
466
                    $i--;
467
                 }
468
            } else {
469
                $_elems[$i++] = $val;
470
            }
471
        }
472
        if (sizeof($_elems) < 1){
473
            return $this->_raiseError(TREE_ERROR_EMPTY_PATH,
474
                        __FUNCTION__, __LINE__);
475
        }
476
        return array($_elems, $sublevel);
477
    }
478
 
479
    // }}}
480
    // {{{ getLevel()
481
 
482
    /**
483
     * get the level, which is how far below the root the element
484
     * with the given id is
485
     *
486
     * @abstract
487
     * @version    2001/11/25
488
     * @access     public
489
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
490
     * @param      mixed   $id     the id of the node to get the level for
491
     *
492
     */
493
    function getLevel($id)
494
    {
495
        return $this->_raiseError(TREE_ERROR_NOT_IMPLEMENTED,
496
                        __FUNCTION__, __LINE__);
497
    }
498
 
499
    // }}}
500
    // {{{ isChildOf()
501
 
502
    /**
503
     * returns if $childId is a child of $id
504
     *
505
     * @abstract
506
     * @version    2002/04/29
507
     * @access     public
508
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
509
     * @param      int     id of the element
510
     * @param      int     id of the element to check if it is a child
511
     * @param      boolean if this is true the entire tree below is checked
512
     * @return     boolean true if it is a child
513
     */
514
    function isChildOf($id, $childId, $checkAll = true)
515
    {
516
        return $this->_raiseError(TREE_ERROR_NOT_IMPLEMENTED,
517
                    __FUNCTION__, __LINE__);
518
    }
519
 
520
    // }}}
521
    // {{{ getIdByPath()
522
 
523
    /**
524
     *
525
     *
526
     */
527
    function getIdByPath($path, $startId = 0,
528
                        $nodeName = 'name', $seperator = '/')
529
    {
530
        return $this->_raiseError(TREE_ERROR_NOT_IMPLEMENTED,
531
                    __FUNCTION__, __LINE__);
532
    }
533
 
534
    // }}}
535
    // {{{ getDepth()
536
 
537
    /**
538
     * return the maximum depth of the tree
539
     *
540
     * @version    2003/02/25
541
     * @access     public
542
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
543
     * @return     int     the depth of the tree
544
     */
545
    function getDepth()
546
    {
547
        return $this->_treeDepth;
548
    }
549
 
550
    // }}}
551
 
552
    //
553
    //  PRIVATE METHODS
554
    //
555
 
556
    // {{{ _prepareResults()
557
 
558
    /**
559
     * prepare multiple results
560
     *
561
     * @see        _prepareResult()
562
     * @access     private
563
     * @version    2002/03/03
564
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
565
     * @param      array   the data to prepare
566
     * @return     array   prepared results
567
     */
568
    function &_prepareResults($results)
569
    {
570
        $newResults = array();
571
        foreach ($results as $key => $aResult) {
572
            $newResults[$key] = $this->_prepareResult($aResult);
573
        }
574
        return $newResults;
575
    }
576
 
577
    // }}}
578
    // {{{ _prepareResult()
579
 
580
    /**
581
      * map back the index names to get what is expected
582
      *
583
      * @access     private
584
      * @version    2002/03/03
585
      * @author     Wolfram Kriesing <wolfram@kriesing.de>
586
      * @param      array   a result
587
      * @return     array   the prepared result
588
      */
589
    function _prepareResult($result)
590
    {
591
        $map = $this->getOption('columnNameMaps');
592
        if ($map) {
593
            foreach ($map as $key => $columnName) {
594
                if (isset($result[$columnName])) {
595
                    $temp = $result[$columnName];   // remember the value from the old name
596
                    unset($result[$columnName]);    // remove the old one
597
                    $result[$key] = $temp;          // save it in the mapped col-name
598
                }
599
            }
600
        }
601
        return $result;
602
    }
603
 
604
    // }}}
605
    // {{{ _getColName()
606
 
607
    /**
608
     * this method retrieves the real column name, as used in the DB
609
     * since the internal names are fixed, to be portable between different
610
     * DB-column namings, we map the internal name to the real column name here
611
     *
612
     * @access     private
613
     * @version    2002/03/02
614
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
615
     * @param      string  the internal name used
616
     * @return     string  the real name of the column
617
     */
618
    function _getColName($internalName)
619
    {
620
        if ($map = $this->getOption('columnNameMaps')) {
621
            if (isset($map[$internalName])) {
622
                return $map[$internalName];
623
            }
624
        }
625
        return $internalName;
626
    }
627
 
628
    // }}}
629
    // {{{ _raiseError()
630
 
631
    /**
632
     *
633
     *
634
     * @access     private
635
     * @version    2002/03/02
636
     * @author     Pierre-Alain Joye <paj@pearfr.org>
637
     * @param      string  the error message
638
     * @param      int     the line in which the error occured
639
     * @param      mixed   the error mode
640
     * @return     object  a Tree_Error
641
     */
642
    function _raiseError($errorCode, $msg = '', $line = 0)
643
    {
644
        include_once 'Tree/Error.php';
645
        return new Tree_Error(
646
            $msg, $line, __FILE__, $mode, $this->dbh->last_query);
647
    }
648
 
649
    // }}}
650
    // {{{ _throwError()
651
 
652
    /**
653
     *
654
     *
655
     * @access     private
656
     * @version    2002/03/02
657
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
658
     * @param      string  the error message
659
     * @param      int     the line in which the error occured
660
     * @param      mixed   the error mode
661
     * @return     object  a Tree_Error
662
     */
663
    function _throwError($msg, $line, $mode = null)
664
    {
665
        include_once 'Tree/Error.php';
666
        if ($mode === null && $this->debug > 0) {
667
            $mode = PEAR_ERROR_PRINT;
668
        }
669
        return new Tree_Error(
670
            $msg, $line, __FILE__, $mode, $this->dbh->last_query);
671
    }
672
 
673
    // }}}
674
 
675
 
676
    /*******************************************************************************/
677
    /************************ METHODS FROM Tree_Memory *****************************/
678
    /*******************************************************************************/
679
 
680
    /**
681
     * returns if the given element has any children
682
     *
683
     * @version 2001/12/17
684
     * @access  public
685
     * @author  Wolfram Kriesing <wolfram@kriesing.de>
686
     * @param   integer $id the id of the node to check for children
687
     * @return  boolean true if the node has children
688
     */
689
    function hasChildren($id = 0)
690
    {
691
        if (isset($this->data[$id]['children']) &&
692
            sizeof($this->data[$id]['children']) > 0) {
693
            return true;
694
        }
695
        return false;
696
    }
697
 
698
 
699
 
700
 
701
 
702
    /*******************************************************************************/
703
    /************************ METHODS FROM Tree_Options ****************************/
704
    /*******************************************************************************/
705
 
706
 
707
 
708
    // {{{ Tree_Options()
709
 
710
    /**
711
     * this constructor sets the options, since i normally need this and
712
     * in case the constructor doesnt need to do anymore i already have
713
     * it done :-)
714
     *
715
     * @version    02/01/08
716
     * @access public
717
     * @author Wolfram Kriesing <wolfram@kriesing.de>
718
     * @param  array   the key-value pairs of the options that shall be set
719
     * @param  boolean if set to true options are also set
720
     *                 even if no key(s) was/were found in the options property
721
     */
722
    function Tree_Options($options=array(), $force=false)
723
    {
724
        $this->_forceSetOption = $force;
725
        if (is_array($options) && sizeof($options)) {
726
            foreach ($options as $key=>$value) {
727
                $this->setOption($key, $value);
728
            }
729
        }
730
    }
731
 
732
    // }}}
733
    // {{{ setOption()
734
 
735
    /**
736
     *
737
     * @access public
738
     * @author Stig S. Baaken
739
     * @param  string  the option name
740
     * @param  mixed   the value for this option
741
     * @param  boolean if set to true options are also set
742
     *                 even if no key(s) was/were found in the options property
743
     */
744
    function setOption($option, $value, $force = false)
745
    {
746
        // if the value is an array extract the keys
747
        // and apply only each value that is set
748
        if (is_array($value)) {
749
            // so we dont override existing options inside an array
750
            // if an option is an array
751
            foreach ($value as $key=>$aValue) {
752
                $this->setOption(array($option,$key),$aValue);
753
            }
754
            return true;
755
        }
756
 
757
        if (is_array($option)) {
758
            $mainOption = $option[0];
759
            $options = "['".implode("']['",$option)."']";
760
            $evalCode = "\$this->options".$options." = \$value;";
761
        } else {
762
            $evalCode = "\$this->options[\$option] = \$value;";
763
            $mainOption = $option;
764
        }
765
 
766
        if ($this->_forceSetOption == true ||
767
            $force == true || isset($this->options[$mainOption])) {
768
            eval($evalCode);
769
            return true;
770
        }
771
        return false;
772
    }
773
 
774
    // }}}
775
    // {{{ setOptions()
776
 
777
    /**
778
     * set a number of options which are simply given in an array
779
     *
780
     * @access public
781
     * @param  array   the values to set
782
     * @param  boolean if set to true options are also set even if no key(s)
783
     *                 was/were found in the options property
784
     */
785
    function setOptions($options, $force = false)
786
    {
787
        if (is_array($options) && sizeof($options)) {
788
            foreach ($options as $key => $value) {
789
                $this->setOption($key, $value, $force);
790
            }
791
        }
792
    }
793
 
794
    // }}}
795
    // {{{ getOption()
796
 
797
    /**
798
     *
799
     * @access     public
800
     * @author     copied from PEAR: DB/commmon.php
801
     * @param      boolean true on success
802
     */
803
    function getOption($option)
804
    {
805
        if (func_num_args() > 1 &&
806
            is_array($this->options[$option])) {
807
            $args = func_get_args();
808
            $evalCode = "\$ret = \$this->options['".
809
                        implode("']['", $args) . "'];";
810
            eval($evalCode);
811
            return $ret;
812
        }
813
 
814
        if (isset($this->options[$option])) {
815
            return $this->options[$option];
816
        }
817
        return false;
818
    }
819
 
820
    // }}}
821
    // {{{ getOptions()
822
 
823
    /**
824
     * returns all the options
825
     *
826
     * @version    02/05/20
827
     * @access     public
828
     * @author     Wolfram Kriesing <wolfram@kriesing.de>
829
     * @return     string      all options as an array
830
     */
831
    function getOptions()
832
    {
833
        return $this->options;
834
    }
835
 
836
    // }}}
837
}
838
 
839
/*
840
 * Local Variables:
841
 * mode: php
842
 * tab-width: 4
843
 * c-basic-offset: 4
844
 * End:
845
 */