public function jsonSerialize()
    {
        $data = $this->getData();
        if (empty($data)) {
            return null;
        }
        foreach (array_keys(static::FOREIGN_KEYS) as $column) {
            $data[$column] = $this->__get($column);
        }
        return $data;
    }
public function jsonSerialize()
    {
        $data = $this->getData();
        if (empty($data)) {
            return null;
        }
        foreach (array_keys(static::FOREIGN_KEYS) as $column) {
            $data[$column] = $this->__get($column);
        }
        return $data;
    }
public function jsonSerialize ( ) { $ data = $ this -> getData ( ) ; if ( empty ( $ data ) ) { return null ; } foreach ( array_keys ( static :: FOREIGN_KEYS ) as $ column ) { $ data [ $ column ] = $ this -> __get ( $ column ) ; } return $ data ; }
Returns the stored data

NOTE:
- Expands foreign models

@return mixed[]
@return null    If no columns are filled
Returns the stored data