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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: robert dot bruce at orange-ftgroup dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 11:01:30 2024 UTC