php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59030 Allow alternative class to be returned by Stomp::readFrame method
Submitted: 2010-01-17 06:49 UTC Modified: 2010-02-12 00:04 UTC
From: robert dot bruce at orange-ftgroup dot com Assigned:
Status: Closed Package: stomp (PECL)
PHP Version: 5.2.10 OS: RHEL5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 + 30 = ?
Subscribe to this entry?

 
 [2010-01-17 06:49 UTC] robert dot bruce at orange-ftgroup dot com
Description:
------------
When calling Stomp::readFrame on an instance of the Stomp class, it would be helpful if a custom class which extends StompFrame is returned.

Example - Stomp::readFrame accepts a parameter of which class to return.

<?php
class CustomFrame extends StompFrame {}

/* setup client and get to a point where reading frame is required */
if ($client->hasFrame()) {
    $frame = $client->readFrame('CustomFrame');
}
?>

There are other places where the Stomp client could be told which class to return by Stomp::readFrame, like the constructor or when subscribing, but defining the class in Stomp::readFrame would give the most flexibility.

Expected result:
----------------
Class returned by calling Stomp::readFrame is an instance of CustomFrame


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-12 00:04 UTC] pierrick@php.net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/stomp

Feature was introduced in 0.4.1 and is now available in the 
stable release 1.0.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 05:01:29 2024 UTC