public function data(array $keys = null)
    {
        if ($keys === null) {
            $keys = $this->keys();
        }

        $data = [];
        foreach ($keys as $key) {
            if (strtolower($key) === 'data') {
                /** @internal Edge Case: Avoid recursive call */
                continue;
            }

            if (isset($this[$key])) {
                $data[$key] = $this[$key];
            }
        }
        return $data;
    }
public function data(array $keys = null)
    {
        if ($keys === null) {
            $keys = $this->keys();
        }

        $data = [];
        foreach ($keys as $key) {
            if (strtolower($key) === 'data') {
                /** @internal Edge Case: Avoid recursive call */
                continue;
            }

            if (isset($this[$key])) {
                $data[$key] = $this[$key];
            }
        }
        return $data;
    }
public function data ( array $ keys = null ) { if ( $ keys === null ) { $ keys = $ this -> keys ( ) ; } $ data = [ ] ; foreach ( $ keys as $ key ) { if ( strtolower ( $ key ) === 'data' ) { /** @internal Edge Case: Avoid recursive call */ continue ; } if ( isset ( $ this [ $ key ] ) ) { $ data [ $ key ] = $ this [ $ key ] ; } } return $ data ; }
Gets all data, or a subset, from this entity.

@uses   self::offsetExists()
@uses   self::offsetGet()
@param  string[] $keys Optional. Extracts only the requested data.
@return array Key-value array of data, excluding pairs with NULL values.
Gets all data or a subset from this entity .