public function filter($value)
    {
        if (!$value instanceof User) {
            return array();
        }

        $info = $value->getInfo();

        return array(
            'id' => $value->getId(),
            'name' => $info->displayName,
            'image' => $info->image ? $info->image->uri : '',
            'email' => $info->email,
        );
    }
public function filter($value)
    {
        if (!$value instanceof User) {
            return array();
        }

        $info = $value->getInfo();

        return array(
            'id' => $value->getId(),
            'name' => $info->displayName,
            'image' => $info->image ? $info->image->uri : '',
            'email' => $info->email,
        );
    }
public function filter ( $ value ) { if ( ! $ value instanceof User ) { return array ( ) ; } $ info = $ value -> getInfo ( ) ; return array ( 'id' => $ value -> getId ( ) , 'name' => $ info -> displayName , 'image' => $ info -> image ? $ info -> image -> uri : '' , 'email' => $ info -> email , ) ; }
Filters an user to a search result array.

@return array
@see \Zend\Filter\FilterInterface::filter()
Filters an user to a search result array .