You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by King JKing <be...@gmail.com> on 2011/06/17 06:41:18 UTC

Thrift gen PHP - include namespace to class

Dear all,

I want to generate PHP client for Thrift Service.
For ex,

namespace php comment
service CommentService{
     i32 addComment(),
}

Thrift will generate class CommentService.

I have question. Does Thrift allow gen PHP class include namespace? (In
above sample, Thrift will gen class comment_CommentService)

Thank you in advance.

Re: Thrift gen PHP - include namespace to class

Posted by Trevor Gattis <gt...@gmail.com>.
That would be brilliant.  I was actually just wondering the same thing last
night when I ran into a PHP parse error when trying to define the php
namespace in the format x.y.z.

Thanks,
  Trevor


On Fri, Jun 17, 2011 at 9:36 AM, Jake Farrell <jf...@apache.org> wrote:

> not available in php was referring to the thrift php lib, not the php
> language. Ticket Thrift-777 is for adding the namespace support into the php
> compiler and can hopefully get resolved shortly. I was planning on looking
> at this tomorrow when i have some time
>
> Jake
>
>
>
>
> On Jun 17, 2011, at 11:28 AM, Prajwal Tuladhar wrote:
>
> > Namespaces are available from PHP 5.3.x
> >
> > http://php.net/namespace
> >
> > -- praj
> >
> >
> >
> > On Fri, Jun 17, 2011 at 12:56 AM, Jake Farrell <jf...@apache.org>
> wrote:
> >
> >> There is a ticket open for this (Thrift-777), but namespaces are
> currently
> >> not available in php. This feature should be available shortly
> >>
> >> Jake
> >>
> >>
> >> On Jun 16, 2011, at 11:41 PM, King JKing wrote:
> >>
> >>> Dear all,
> >>>
> >>> I want to generate PHP client for Thrift Service.
> >>> For ex,
> >>>
> >>> namespace php comment
> >>> service CommentService{
> >>>    i32 addComment(),
> >>> }
> >>>
> >>> Thrift will generate class CommentService.
> >>>
> >>> I have question. Does Thrift allow gen PHP class include namespace? (In
> >>> above sample, Thrift will gen class comment_CommentService)
> >>>
> >>> Thank you in advance.
> >>
> >>
>
>

Re: Thrift gen PHP - include namespace to class

Posted by Jake Farrell <jf...@apache.org>.
not available in php was referring to the thrift php lib, not the php language. Ticket Thrift-777 is for adding the namespace support into the php compiler and can hopefully get resolved shortly. I was planning on looking at this tomorrow when i have some time

Jake




On Jun 17, 2011, at 11:28 AM, Prajwal Tuladhar wrote:

> Namespaces are available from PHP 5.3.x
> 
> http://php.net/namespace
> 
> -- praj
> 
> 
> 
> On Fri, Jun 17, 2011 at 12:56 AM, Jake Farrell <jf...@apache.org> wrote:
> 
>> There is a ticket open for this (Thrift-777), but namespaces are currently
>> not available in php. This feature should be available shortly
>> 
>> Jake
>> 
>> 
>> On Jun 16, 2011, at 11:41 PM, King JKing wrote:
>> 
>>> Dear all,
>>> 
>>> I want to generate PHP client for Thrift Service.
>>> For ex,
>>> 
>>> namespace php comment
>>> service CommentService{
>>>    i32 addComment(),
>>> }
>>> 
>>> Thrift will generate class CommentService.
>>> 
>>> I have question. Does Thrift allow gen PHP class include namespace? (In
>>> above sample, Thrift will gen class comment_CommentService)
>>> 
>>> Thank you in advance.
>> 
>> 


Re: Thrift gen PHP - include namespace to class

Posted by Prajwal Tuladhar <dy...@gmail.com>.
Namespaces are available from PHP 5.3.x

http://php.net/namespace

-- praj



On Fri, Jun 17, 2011 at 12:56 AM, Jake Farrell <jf...@apache.org> wrote:

> There is a ticket open for this (Thrift-777), but namespaces are currently
> not available in php. This feature should be available shortly
>
> Jake
>
>
> On Jun 16, 2011, at 11:41 PM, King JKing wrote:
>
> > Dear all,
> >
> > I want to generate PHP client for Thrift Service.
> > For ex,
> >
> > namespace php comment
> > service CommentService{
> >     i32 addComment(),
> > }
> >
> > Thrift will generate class CommentService.
> >
> > I have question. Does Thrift allow gen PHP class include namespace? (In
> > above sample, Thrift will gen class comment_CommentService)
> >
> > Thank you in advance.
>
>

Re: Thrift gen PHP - include namespace to class

Posted by Jake Farrell <jf...@apache.org>.
There is a ticket open for this (Thrift-777), but namespaces are currently not available in php. This feature should be available shortly

Jake


On Jun 16, 2011, at 11:41 PM, King JKing wrote:

> Dear all,
> 
> I want to generate PHP client for Thrift Service.
> For ex,
> 
> namespace php comment
> service CommentService{
>     i32 addComment(),
> }
> 
> Thrift will generate class CommentService.
> 
> I have question. Does Thrift allow gen PHP class include namespace? (In
> above sample, Thrift will gen class comment_CommentService)
> 
> Thank you in advance.