File: Property.php

package info (click to toggle)
php-horde-sesha 1.0.0~beta1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 924 kB
  • ctags: 443
  • sloc: php: 1,809; xml: 338; makefile: 10; sh: 3
file content (35 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
class Sesha_Entity_Property extends Horde_Rdo_Base
{
    /**
     * Explicit getter for the parameters variable interface.
     * Internalizes the (un)serialization of the parameters array for backend storage
     * returns mixed
     */
    public function getParameters()
    {
        return unserialize($this->_fields['parameters']);
    }

    /**
     * Explicit setter for the parameters variable interface.
     * Internalizes the (un)serialization of the parameters array for backend storage
     * returns mixed
     */
    public function setParameters($parameters)
    {
        return $this->_fields['parameters'] = serialize($parameters);
    }

    /**
     * Save any changes to the backend.
     * Overridden because the default save() method passes the external representation to backend, not the serialized representation
     * @return boolean Success.
     */
    public function save()
    {
        return $this->getMapper()->update($this->property_id, $this->_fields) == 1;
    }

}