I just started working with the github hosted build of apache thrift, I am basically interested in a java client and PHP server implementation, but for now i am using the php server and client only
All nice and easy i made my thrift file
namespace php mobiledata
struct sms
{
1: string from,
2: string to,
3: string smstext,
4: string smsdatetime,
5: string smsdirection
}
struct smsdetails
{
1: list<sms> smsdata
}
service mobiledataservice
{
void insertsmsdata (1: smsdetails smslist)
}
And I generated the gen-php folder, which has got Types.php and mobiledataservice.php
the basic sample that comes with the github for php as server shows a line of code $handler = new CalculatorHandler(); $processor = new \tutorial\CalculatorProcessor($handler);
I can't find this class "CalculatorProcessor" and certainly I don't have a comparative class generated in my gen_php like mobiledataprocessor, and it baffles me as to how I would run my server in absence of processor.
The server code is generated by calling
thrift -r -gen php:server tutorial.thrift
Note the :server
part after -gen php
, this triggers the processor generation.
These are all PHP options available:
php (PHP):
inlined: Generate PHP inlined files
server: Generate PHP server stubs
oop: Generate PHP with object oriented subclasses
rest: Generate PHP REST processors