src/Serializer/ArraySerializer.php
private function objectTransform($val)
    {
        if (! is_object($val)) {
            return $val;
        } elseif ($val instanceof Accessable) {
            return $this->serialize($val);
        } else {
            // Fallback for stdClass objects
            return json_decode(json_encode($val), true);
        }
    }
private function objectTransform($val)
    {
        if (! is_object($val)) {
            return $val;
        } elseif ($val instanceof Accessable) {
            return $this->serialize($val);
        } else {
            // Fallback for stdClass objects
            return json_decode(json_encode($val), true);
        }
    }
private function objectTransform ( $ val ) { if ( ! is_object ( $ val ) ) { return $ val ; } elseif ( $ val instanceof Accessable ) { return $ this -> serialize ( $ val ) ; } else { // Fallback for stdClass objects return json_decode ( json_encode ( $ val ) , true ) ; } }
Transforms objects to arrays

@param $val

@return mixed
Transforms objects to arrays