public function get($property = null, $default = null)
    {
        $result = $default;

        if (is_null($property)) {
            $result  = get_object_vars($this);

            foreach ($result as $key => $value) {
                if ('_' == substr($key, 0, 1)) {
                    unset($result[$key]);
                }
            }
        } else {
            if (isset($this->$property)) {
                $result = $this->$property;
            }
        }

        return $result;
    }
public function get($property = null, $default = null)
    {
        $result = $default;

        if (is_null($property)) {
            $result  = get_object_vars($this);

            foreach ($result as $key => $value) {
                if ('_' == substr($key, 0, 1)) {
                    unset($result[$key]);
                }
            }
        } else {
            if (isset($this->$property)) {
                $result = $this->$property;
            }
        }

        return $result;
    }
public function get ( $ property = null , $ default = null ) { $ result = $ default ; if ( is_null ( $ property ) ) { $ result = get_object_vars ( $ this ) ; foreach ( $ result as $ key => $ value ) { if ( '_' == substr ( $ key , 0 , 1 ) ) { unset ( $ result [ $ key ] ) ; } } } else { if ( isset ( $ this -> $ property ) ) { $ result = $ this -> $ property ; } } return $ result ; }
Get the object properties

If no property name is given then the function will return an associative
array of all properties.

If the property does not exist and a  default value is specified this is
returned, otherwise the function return NULL.

@param   string  $property The name of the property
@param   mixed   $default  The default value
@return  mixed   The value of the property, an associative array or NULL
Get the object properties