for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File was created 30.09.2015 10:49
*/
namespace PeekAndPoke\Component\Slumber\Annotation\Slumber;
use Doctrine\Common\Annotations\Annotation;
* AsKeyValuePairs transforms arrays into the form { 'k': ..., 'v': ... }
*
* Keys are preserved.
* The result of slumbering will look like:
* Input:
* <code>
* array ( 'a' => 'A', 'b' => 'B' )
* array ( 'C', 'B' )
* </code>
* Output:
* [ { 'k' : 'a', 'v' : 'A'}, { 'k' : 'b', 'v' : 'B'} ]
* [ { 'k' : '0', 'v' : 'C'}, { 'k' : '1', 'v' : 'D'} ]
* The keys ('k') will always be strings
* @Annotation
* @Annotation\Target("PROPERTY")
* @author Karsten J. Gerber <[email protected]>
class AsKeyValuePairs extends AsCollection
{
}