public function getAll(array $options = [])
    {
        // This preserves compatibility for the old includeInternals parameter.
        $includeInternals       = false;
        $ignoreHiddenAttributes = $this->{self::ENTRY_IGNOREHIDDENATTRIBUTES};
        $_hiddenAttributes      = $this->{self::ENTRY_HIDDENATTRIBUTES};

        if (!is_array($options)) {
            $includeInternals = $options;
        } else {
            // keeping the non-underscored version for backwards-compatibility
            $includeInternals = array_key_exists(
                'includeInternals',
                $options
            ) ? $options['includeInternals'] : $includeInternals;

            $includeInternals = array_key_exists(
                '_includeInternals',
                $options
            ) ? $options['_includeInternals'] : $includeInternals;

            // keeping the non-underscored version for backwards-compatibility
            $ignoreHiddenAttributes = array_key_exists(
                'ignoreHiddenAttributes',
                $options
            ) ? $options['ignoreHiddenAttributes'] : $ignoreHiddenAttributes;

            $ignoreHiddenAttributes = array_key_exists(
                self::ENTRY_IGNOREHIDDENATTRIBUTES,
                $options
            ) ? $options[self::ENTRY_IGNOREHIDDENATTRIBUTES] : $ignoreHiddenAttributes;

            $_hiddenAttributes = array_key_exists(
                self::ENTRY_HIDDENATTRIBUTES,
                $options
            ) ? $options[self::ENTRY_HIDDENATTRIBUTES] : $_hiddenAttributes;
        }

        $data         = $this->_values;
        $nonInternals = ['_changed', '_values', self::ENTRY_HIDDENATTRIBUTES];

        if ($includeInternals === true) {
            foreach ($this as $key => $value) {
                if ($key[0] === '_' && 0 !== strpos($key, '__') && !in_array($key, $nonInternals, true)) {
                    $data[$key] = $value;
                }
            }
        }

        if ($ignoreHiddenAttributes === false) {
            $data = $this->filterHiddenAttributes($data, $_hiddenAttributes);
        }

        if (null !== $this->_key) {
            $data['_key'] = $this->_key;
        }

        return $data;
    }
public function getAll(array $options = [])
    {
        // This preserves compatibility for the old includeInternals parameter.
        $includeInternals       = false;
        $ignoreHiddenAttributes = $this->{self::ENTRY_IGNOREHIDDENATTRIBUTES};
        $_hiddenAttributes      = $this->{self::ENTRY_HIDDENATTRIBUTES};

        if (!is_array($options)) {
            $includeInternals = $options;
        } else {
            // keeping the non-underscored version for backwards-compatibility
            $includeInternals = array_key_exists(
                'includeInternals',
                $options
            ) ? $options['includeInternals'] : $includeInternals;

            $includeInternals = array_key_exists(
                '_includeInternals',
                $options
            ) ? $options['_includeInternals'] : $includeInternals;

            // keeping the non-underscored version for backwards-compatibility
            $ignoreHiddenAttributes = array_key_exists(
                'ignoreHiddenAttributes',
                $options
            ) ? $options['ignoreHiddenAttributes'] : $ignoreHiddenAttributes;

            $ignoreHiddenAttributes = array_key_exists(
                self::ENTRY_IGNOREHIDDENATTRIBUTES,
                $options
            ) ? $options[self::ENTRY_IGNOREHIDDENATTRIBUTES] : $ignoreHiddenAttributes;

            $_hiddenAttributes = array_key_exists(
                self::ENTRY_HIDDENATTRIBUTES,
                $options
            ) ? $options[self::ENTRY_HIDDENATTRIBUTES] : $_hiddenAttributes;
        }

        $data         = $this->_values;
        $nonInternals = ['_changed', '_values', self::ENTRY_HIDDENATTRIBUTES];

        if ($includeInternals === true) {
            foreach ($this as $key => $value) {
                if ($key[0] === '_' && 0 !== strpos($key, '__') && !in_array($key, $nonInternals, true)) {
                    $data[$key] = $value;
                }
            }
        }

        if ($ignoreHiddenAttributes === false) {
            $data = $this->filterHiddenAttributes($data, $_hiddenAttributes);
        }

        if (null !== $this->_key) {
            $data['_key'] = $this->_key;
        }

        return $data;
    }
public function getAll ( array $ options = [ ] ) { // This preserves compatibility for the old includeInternals parameter. $ includeInternals = false ; $ ignoreHiddenAttributes = $ this -> { self :: ENTRY_IGNOREHIDDENATTRIBUTES } ; $ _hiddenAttributes = $ this -> { self :: ENTRY_HIDDENATTRIBUTES } ; if ( ! is_array ( $ options ) ) { $ includeInternals = $ options ; } else { // keeping the non-underscored version for backwards-compatibility $ includeInternals = array_key_exists ( 'includeInternals' , $ options ) ? $ options [ 'includeInternals' ] : $ includeInternals ; $ includeInternals = array_key_exists ( '_includeInternals' , $ options ) ? $ options [ '_includeInternals' ] : $ includeInternals ; // keeping the non-underscored version for backwards-compatibility $ ignoreHiddenAttributes = array_key_exists ( 'ignoreHiddenAttributes' , $ options ) ? $ options [ 'ignoreHiddenAttributes' ] : $ ignoreHiddenAttributes ; $ ignoreHiddenAttributes = array_key_exists ( self :: ENTRY_IGNOREHIDDENATTRIBUTES , $ options ) ? $ options [ self :: ENTRY_IGNOREHIDDENATTRIBUTES ] : $ ignoreHiddenAttributes ; $ _hiddenAttributes = array_key_exists ( self :: ENTRY_HIDDENATTRIBUTES , $ options ) ? $ options [ self :: ENTRY_HIDDENATTRIBUTES ] : $ _hiddenAttributes ; } $ data = $ this -> _values ; $ nonInternals = [ '_changed' , '_values' , self :: ENTRY_HIDDENATTRIBUTES ] ; if ( $ includeInternals === true ) { foreach ( $ this as $ key => $ value ) { if ( $ key [ 0 ] === '_' && 0 !== strpos ( $ key , '__' ) && ! in_array ( $ key , $ nonInternals , true ) ) { $ data [ $ key ] = $ value ; } } } if ( $ ignoreHiddenAttributes === false ) { $ data = $ this -> filterHiddenAttributes ( $ data , $ _hiddenAttributes ) ; } if ( null !== $ this -> _key ) { $ data [ '_key' ] = $ this -> _key ; } return $ data ; }
Get all document attributes

@param mixed $options - optional, array of options for the getAll function, or the boolean value for $includeInternals
<p>Options are :
<li>'_includeInternals' - true to include the internal attributes. Defaults to false</li>
<li>'_ignoreHiddenAttributes' - true to show hidden attributes. Defaults to false</li>
</p>

@return array - array of all document attributes/values
Get all document attributes