History log of /external/flatbuffers/src/idl_gen_php.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
03e2899985849dbffa3178ae76c00288f7aca79b 22-Sep-2017 Wouter van Oortmerssen <aardappel@gmail.com> Made the parser not have any hard-coded keywords.

This prevented any keywords showing up as JSON field names, for example.

Change-Id: Ie9d0cada96778e06016ca02ca96d052410a37038
Tested: on Linux.
/external/flatbuffers/src/idl_gen_php.cpp
46bb05d95226c72cc85242eee386465860786333 11-Aug-2017 Kamil Rojewski <krojew@users.noreply.github.com> Vector of unions for TS/JS and PHP (#4404)

* Eclipse ignore

* TypeScript support

* Prefixing enums

* Test results

* Merged JS and TS generators

* Fixed AppVeyor build problems

* Fixed more AppVeyor build problems

* Fixed more AppVeyor build problems

* Changed TS flag to options struct

* Storing options by value

* Removed unneeded const

* Re-export support for unions

* Uint support

* Casting bools to numbers for mutation

* TS shell tests

* Reverted generates js test file to original version

* Backing up js tests and properly generating test data

* Not importing flatbuffers for TS test generation

* Not overwriting generated js for tests

* AppVeyor test fixes

* Generating the most strict TS code possible

* Not returning null when creating vectors

* Not returning null from struct contructors

* Vector of unions for ts/js

* Sanity check for languages

* Indentation fix + output test files

* Vectors of unions for php

* Fixes to union vector handling + tests
/external/flatbuffers/src/idl_gen_php.cpp
f2b3705c2c62c40afdef96f73f0aeaf32b4c8e0e 02-Aug-2017 MikkelFJ <mikkelfj@gmail.com> Add scalar type aliases for int8, uint8, ..., f32, f64 (#4400)

* Add type aliases

* Add generated code

* Rebase master
/external/flatbuffers/src/idl_gen_php.cpp
0f5f7faa9fcf034d1189653f1b6e32b245a7f8a1 16-May-2017 schoetbi <schoetbi@users.noreply.github.com> C#: Added <autogenerated> in cs generator file header comment (#4291)

* Added <autogenerated> in cs generator file header comment
#4287

* CS: Added xml-correct file header comment including "<auto-generated>...</auto-generated>"
code_generators.cpp: FlatBuffersGeneratedWarning() function replaced by compile time constant "GeneratedWarning"
also removed extra newlines at end of GeneratedWarning to be able to generate a xml well formed file comment for cs files
#4291

* code_generators: Changed static string GeneratedWarning back to function FlatBuffersGeneratedWarning()
#4291

* Added modified Unit-Test files
#4291

* idl_gen_general: Add autogenerated only in C# code
#4291
/external/flatbuffers/src/idl_gen_php.cpp
424fc0c3acfeb8ce2d45192565108c7891626c7d 13-Oct-2016 Wouter van Oortmerssen <wvo@google.com> Fixed inconsistent use of namespace directory prefixing.

Change-Id: I2cab7a1f68b8e643c1057e0a366572421a94ed41
Tested: on Linux.
/external/flatbuffers/src/idl_gen_php.cpp
03ad8fa4d9574b7e613e10df3fe7fc4d9207a4bb 14-Jun-2016 lakedaemon <olivier.binda@wanadoo.fr> sharing the WrapInNameSpace methods
/external/flatbuffers/src/idl_gen_php.cpp
cb6cc3dfb6bac954d2bd29bdccccb9ed10bf30b9 14-Jun-2016 lakedaemon <olivier.binda@wanadoo.fr> php:removed parser from method signatures
/external/flatbuffers/src/idl_gen_php.cpp
66f2aac26fe28165cb0a2036249954ddbf122d87 14-Jun-2016 lakedaemon <olivier.binda@wanadoo.fr> php:pulled methods inside the generator
/external/flatbuffers/src/idl_gen_php.cpp
3639032d1e2224663202f79ca33c5039eed95f29 18-Jun-2016 Wouter van Oortmerssen <wvo@google.com> Allow unions of table types with the same name but from different namespaces.

Also fixed most codegenerators using the wrong namespace when multiple
namespace were used in a file, with some files not being generated.

Change-Id: Ib42969221239d7244e431cbd667ef69200fc415f
Tested: on Linux.
Bug: 29338474
/external/flatbuffers/src/idl_gen_php.cpp
61b101d4429748e4723d384e5dbf69c451a32282 28-May-2016 lakedaemon <olivier.binda@wanadoo.fr> sharing namespace_dir and the namespace string methods
/external/flatbuffers/src/idl_gen_php.cpp
cd1493b0829b48407887844921ef0e040c0f485a 26-May-2016 lakedaemon <olivier.binda@wanadoo.fr> sharing the Flatbuffers warning
/external/flatbuffers/src/idl_gen_php.cpp
6765c19d45509fdcffd5ee62cac5cacea32bd397 26-Apr-2016 Lakedaemon <olivier.binda@wanadoo.fr> memory leak fix + php/js/python transition to class based generator
/external/flatbuffers/src/idl_gen_php.cpp
28a3c939e7f2083b79254ff90cfde77e51908bc8 14-Mar-2016 Armen Baghumian <armen@vardump.org> Implement __vector_as_bytes and methods to get [ubyte] efficiently

Currently in order to get a value type of [ubyte] in PHP, iteration is
necessary which is not efficient. Helper __vector_as_bytes has been
implemented in order to return the byte arrays in PHP efficiently.

Appropriate methods also been added to use aforementioned method to return
the byte array. (e.g. get*Bytes()).

The reason the methods are named get*Bytes() and not for instance
get*ByteArray() is the fact that PHP doesn't support byte arrays and the
binary safe string implementation in PHP is used to simulate byte arrays
and since there is chance for PHP users to confuse this with PHP arrays
the name get*Bytes() has been chosen.

In the future __vector_as_bytebuffer() method can also be implemented to
return PHP implementation of ByteBuffer.
/external/flatbuffers/src/idl_gen_php.cpp
c9198dbbb8422306cb2d3b05b232ee114317e3f6 17-Dec-2015 Shuhei Tanuma <chobieee@gmail.com> (PHP) fixes getting indirect table, also fixes getInt method on 32bit machine.
/external/flatbuffers/src/idl_gen_php.cpp
45bda6e08de1436e8a25e791b776e0bcc38f232b 01-Dec-2015 Wouter van Oortmerssen <wvo@google.com> Added --gen-all to generate code for a schema and all its includes.

Also refactored the way options are stored.

Change-Id: I709ac908cd2aba396c9c282725cf1d42ccce0882
Tested: on Linux.
/external/flatbuffers/src/idl_gen_php.cpp
5ce86826718c938e38b0f57e4bc5840fe15a1565 05-Nov-2015 Shuhei Taunma <chobieee@gmail.com> (PHP) add experimental support for PHP language.

* codegen for all basic features: WIP (probably implemented all basic feature)
* JSON parsing: NO
* Simple mutation: NO
* Reflection: NO
* Buffer verifier: NO (will be add later)
* Testing: basic: Yes
* Testing: fuzz: Yes
* Performance: Not bad
* Platform: Supported Linux, OS X, Windows (has 32bit integer limitation)
* Engine Unity: No

flatc --php monster_test.fbs

<?php
//include neccessary files.
$fbb = new Google\FlatBuffers\FlatBufferBuilder(1);
$str = $fbb->createString("monster");
\MyGame\Example\Monster::startMonster($fbb);
\MyGame\Example\Monster::addHp($fbb, 80);
\MyGame\Example\Monster::addName($fbb, $str);
$mon = \MyGame\Example\Monster::endMonster($fbb);
$fbb->finish($mon);
echo $fbb->sizedByteArray();

PHP 5.4 higher

Currently, we do not register this library to packagist as still experimental and versioning problem.
If you intended to use flatbuffers with composer. add repostiories section to composer.json like below.

"repositories": [{
"type": "vcs",
"url": "https://github.com/google/flatbuffers"
}],

and just put google/flatbuffers.

"require": {
"google/flatbuffers": "*"
}

* PHP's integer is platform dependant. we strongly recommend use 64bit machine
and don't use uint, ulong types as prevent overflow issue.
ref: http://php.net/manual/en/language.types.integer.php

* php don't support float type. floating point numbers are always parsed as double precision internally.
ref: http://php.net/manual/en/language.types.float.php

* ByteBuffer is little bit slow implemnentation due to many chr/ord function calls. Especially encoding objects.
This is expected performance as PHP5 has parsing arguments overhead. probably we'll add C-extension.

Basically, PHP implementation respects Java and C# implementation.

Note: ByteBuffer and FlatBuffersBuilder class are not intended to use other purposes.
we may change internal API foreseeable future.

PSR-2, PSR-4 standards.

Implemented simple assertion class (respect JavaScript testcase implementation) as we prefer small code base.
this also keeps CI iteration speed.

we'll choose phpunit or something when the test cases grown.
/external/flatbuffers/src/idl_gen_php.cpp