Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bramp/protoc-gen-php
Browse files Browse the repository at this point in the history
  • Loading branch information
bramp committed Sep 10, 2010
2 parents 8b03969 + 71dda71 commit 218a971
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
*.o
*.pb.cc
*.pb.h
protoc-gen-php
4 changes: 2 additions & 2 deletions Makefile
@@ -1,6 +1,6 @@

#CXX=g++
CXX=/home/bramp/llvm/Debug/bin/clang
CXX=g++
#CXX=/home/bramp/llvm/Debug/bin/clang

CXXFLAGS = -Wall -g

Expand Down
20 changes: 20 additions & 0 deletions README
@@ -0,0 +1,20 @@
This is a PHP Google Protocol Buffer Generator Plugin for protoc. It generates PHP code from a .proto file.
by Andrew Brampton (c) 2010

It's not finished, but supports most common features, and I'm currently using it in a production system.

I've only tested the code on Debian Linux. To build just type "make". You may need the following libraries which can be installed from apt:

libprotobuf-dev
libprotobuf-lite6
libprotobuf6
libprotoc-dev
libprotoc6

Once compiled you can use it via protoc like so:

protoc -I. -I/usr/include --php_out . --plugin=protoc-gen-php=./protoc-gen-php your.proto

This should generate the file "your.proto.php", which should be able to encode and decode protocol buffer messages. When using the generated PHP code you must include the "protocolbuffers.inc.php" file.

There are many TODOs to finish, for example writing better documentation :)

0 comments on commit 218a971

Please sign in to comment.