Add ObjectToArrayTransformerInterface with an automatic implementation
This commit is contained in:
parent
8ae119e20b
commit
f82d1b191b
2 changed files with 48 additions and 0 deletions
15
Transformer/ObjectToArrayTransformerInterface.php
Normal file
15
Transformer/ObjectToArrayTransformerInterface.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace FOQ\ElasticaBundle\Transformer;
|
||||
|
||||
interface ObjectToArrayTransformerInterface
|
||||
{
|
||||
/**
|
||||
* Transforms an object into an array having the required keys
|
||||
*
|
||||
* @param object $object the object to convert
|
||||
* @param array $requiredKeys the keys we want to have in the returned array
|
||||
* @return array
|
||||
**/
|
||||
public function transform($object, array $requiredKeys);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue