public function toArray() {

        $properties = get_object_vars($this);

        foreach($properties as $var => &$value) {
            if(gettype($value)  === 'object') {
                unset($properties[$var]);
            }
        }

        return $properties;
    }
public function toArray() {

        $properties = get_object_vars($this);

        foreach($properties as $var => &$value) {
            if(gettype($value)  === 'object') {
                unset($properties[$var]);
            }
        }

        return $properties;
    }
public function toArray ( ) { $ properties = get_object_vars ( $ this ) ; foreach ( $ properties as $ var => & $ value ) { if ( gettype ( $ value ) === 'object' ) { unset ( $ properties [ $ var ] ) ; } } return $ properties ; }
Get properties as array view

@return array
Get properties as array view