1. 17 Nov, 2015 1 commit
    • Shuhei Taunma's avatar
      (PHP) add experimental support for PHP language. · 5ce86826
      Shuhei Taunma authored
      * 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.
      5ce86826
  2. 11 Nov, 2015 1 commit
  3. 10 Nov, 2015 2 commits
  4. 09 Nov, 2015 1 commit
  5. 07 Nov, 2015 1 commit
  6. 06 Nov, 2015 1 commit
  7. 29 Oct, 2015 2 commits
  8. 28 Oct, 2015 2 commits
  9. 22 Oct, 2015 1 commit
    • Stewart Miles's avatar
      Improved build rule generation for Android flatbuffer headers. · ed88f7de
      Stewart Miles authored
      * Added the ability to create a build target for generated headers.
      * Made it possible for generated header targets to depend upon each
        other or arbitrary build targets.
      
      Tested:
      Verified some pretty complex libraries with numerous flatbuffer schema
      dependencies build using this macro on Linux with the NDK.
      Bug: 25188384
      
      Change-Id: I846855a50808e58c34cdf7086e93e7ea0df69e0d
      ed88f7de
  10. 20 Oct, 2015 3 commits
  11. 19 Oct, 2015 6 commits
  12. 18 Oct, 2015 2 commits
  13. 15 Oct, 2015 7 commits
  14. 13 Oct, 2015 1 commit
  15. 08 Oct, 2015 1 commit
  16. 29 Sep, 2015 1 commit
  17. 28 Sep, 2015 3 commits
  18. 25 Sep, 2015 4 commits