mirror of
https://github.com/getgrav/grav.git
synced 2026-03-06 20:41:36 +01:00
Updated UserInterface and FlexObjectInterface by adding missing update() parameter
This commit is contained in:
@@ -87,9 +87,10 @@ class User extends Data implements UserInterface
|
||||
* Update object with data
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $files
|
||||
* @return $this
|
||||
*/
|
||||
public function update(array $data)
|
||||
public function update(array $data, array $files = [])
|
||||
{
|
||||
$this->merge($data);
|
||||
|
||||
|
||||
@@ -15,6 +15,13 @@ use Grav\Common\Media\Interfaces\MediaInterface;
|
||||
use Grav\Common\Page\Medium\ImageMedium;
|
||||
use RocketTheme\Toolbox\ArrayTraits\ExportInterface;
|
||||
|
||||
/**
|
||||
* Interface UserInterface
|
||||
* @package Grav\Common\User\Interfaces
|
||||
*
|
||||
* @property string $username
|
||||
* @property string $email
|
||||
*/
|
||||
interface UserInterface extends DataInterface, MediaInterface, \ArrayAccess, \JsonSerializable, ExportInterface
|
||||
{
|
||||
/**
|
||||
@@ -123,9 +130,10 @@ interface UserInterface extends DataInterface, MediaInterface, \ArrayAccess, \Js
|
||||
* Update object with data
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $files
|
||||
* @return $this
|
||||
*/
|
||||
public function update(array $data);
|
||||
public function update(array $data, array $files = []);
|
||||
|
||||
/**
|
||||
* Returns whether the data already exists in the storage.
|
||||
|
||||
@@ -82,6 +82,14 @@ interface FlexObjectInterface extends NestedObjectInterface, \ArrayAccess
|
||||
*/
|
||||
public function exists();
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param array $files
|
||||
* @return $this
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function update(array $data, array $files = []);
|
||||
|
||||
/**
|
||||
* Returns the blueprint for the object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user