public function addExtraData($item)
    {
        if (!($item instanceof ExtraData)) {
            if (is_array($item)) {
                try {
                    $item = new ExtraData($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate ExtraData. ' . $e->getMessage(), E_USER_WARNING);
                }
            } else {
                trigger_error('Array parameter item is not of expected type "ExtraData"!', E_USER_WARNING);
            }
        }
        $this->extraData[] = $item;

        return $this;
    }
public function addExtraData($item)
    {
        if (!($item instanceof ExtraData)) {
            if (is_array($item)) {
                try {
                    $item = new ExtraData($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate ExtraData. ' . $e->getMessage(), E_USER_WARNING);
                }
            } else {
                trigger_error('Array parameter item is not of expected type "ExtraData"!', E_USER_WARNING);
            }
        }
        $this->extraData[] = $item;

        return $this;
    }
Adds an object of "ExtraData" of the User.

@param ExtraData|array $item

@return User