public function serialize(OpenQuestion $wordsQuestion, array $options = [])
    {
        $serialized = [];

        if (in_array(Transfer::INCLUDE_SOLUTIONS, $options)) {
            $serialized['solutions'] = $this->serializeSolutions($wordsQuestion, $options);
        }

        return $serialized;
    }
public function serialize(OpenQuestion $wordsQuestion, array $options = [])
    {
        $serialized = [];

        if (in_array(Transfer::INCLUDE_SOLUTIONS, $options)) {
            $serialized['solutions'] = $this->serializeSolutions($wordsQuestion, $options);
        }

        return $serialized;
    }
public function serialize ( OpenQuestion $ wordsQuestion , array $ options = [ ] ) { $ serialized = [ ] ; if ( in_array ( Transfer :: INCLUDE_SOLUTIONS , $ options ) ) { $ serialized [ 'solutions' ] = $ this -> serializeSolutions ( $ wordsQuestion , $ options ) ; } return $ serialized ; }
Converts a Words question into a JSON-encodable structure.

@param OpenQuestion $wordsQuestion
@param array        $options

@return array
Converts a Words question into a JSON - encodable structure .