Skip to content

Commit

Permalink
Added Emanuele Ruffaldi's original source from 0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Adams committed Sep 26, 2015
1 parent 40adf9a commit b9e2af6
Show file tree
Hide file tree
Showing 17 changed files with 5,099 additions and 0 deletions.
1 change: 1 addition & 0 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Emanuele Ruffaldi
107 changes: 107 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
2008-07-17 Emanuele Ruffaldi <[email protected]>
version 0.9.1
- fixed pecl bug 12668 on anonymous serialization

2007-02-21 Emanuele Ruffaldi <[email protected]>
version 0.9
- added "version" in "serverInfo" for AM0 while sending recordset
- charset handling

2007-02-20 Emanuele Ruffaldi <[email protected]>
- cleaned comments, AMF_DEALLOC macro and if

2007-02-18 Emanuele Ruffaldi <[email protected]>
- added "version" in "serverInfo" for AM0 while sending recordset

2007-02-16 Emanuele Ruffaldi <[email protected]>
version 0.9
- changed back the callback
- fixed reference issue in callback, caused by callback function with &

2007-02-14 Emanuele Ruffaldi <[email protected]>
- finished implementation of the charset handling
- small test with testCharset
- fixed all tests with the new serialization callback
- added AMF_TRANSLATE_CHARSET_NOASCII in decoding to skip UTF8 that are US-ASCII (that is lower than 0x7F):
UTF-8, ISO-8859-1 have the first part in common to US-ASCII

AMF_TRANSLATE_CHARSET_NOASCII cannot be used in encoding Big5
Big5 is double byte: first byte is ASCII or in 0x81-0xFE, second in 0x40 to 0x7e, 0xa1 to 0xfe
Shift_JIS is double byte: first byte is is ASCII (with exception) or over, second can be low or high


2007-02-13 Emanuele Ruffaldi <[email protected]>
- initial implementation of the charset handling.
- TODO: check the use of shared
- TODO: check the new scheme for encoding callback
- TODO: check the use of raw

2007-02-08 Emanuele Ruffaldi <[email protected]>
version 0.8.9
- added AMF_TRANSLATE_CHARSET flag, AMFE_TRANSLATE_CHARSET event and added event to the callback
for supporting different charsets. Changes have been applied to: amf3_write_string,amf3_write_string_zval
amf0_serialize_string,amf0_serialize_zstring,amf0_write_string. In AMF3 the transliteration is performed
AFTER the cache check. TODOOOOO!

2007-02-01 Emanuele Ruffaldi <[email protected]>
version 0.8.8
- StringBuilder as resource
- AMF_AS_STRING_BUILDER in amf_encode for returing a StringBuilder resource
- fixed bug in the amf4.dsp creating bad PHP4 modules

2007-01-27 Emanuele Ruffaldi <[email protected]>
- removed warning in linux build

2007-01-20 Emanuele Ruffaldi <[email protected]>
version 0.8.7
- fixed encoding of private member variables

2007-01-13 Emanuele Ruffaldi <[email protected]>

- fixed head of AMF3_OBJECT that was written as byte
- fixed case of rows shorter than columns in recordset

2007-01-12 Emanuele Ruffaldi <[email protected]>
version 0.8.5 and change name to AMF
- fixed IS_ARRAY

2007-01-11 Emanuele Ruffaldi <[email protected]>
version: 0.8.3
- added AMFC_BYTEARRAY in encoding callback for encoding ByteArray
- added AMFE_BYTEARRAY for decoding ByteArray as a callback
- no more AMFE_MAP for objects with empty classname

2007-01-08 Emanuele Ruffaldi <[email protected]>
- added phpinfo
- added nextStringIndex for future optimized zval lookup
-
- fixed caching of zval with handling of is_ref

2007-01-07 Emanuele Ruffaldi <[email protected]>
- fixed return of classname from encoding callback
- added __amfphp_recordset__ for AMF0 exposing it as RecordSet object
- fixed array count in decoding array

2007-01-06 Emanuele Ruffaldi <[email protected]>

- arrays inited to
- stdclass class is mapped to anonymous object in AMF3
- added AMFE_POST_XML
- added AMFE_MAP_EXTERNABLIZABLE
- negative integer keys

2007-01-05 Emanuele Ruffaldi <[email protected]>

- added support for resources
- fixed type check in encoding callbacks
- added documentation
- cleaned numeric string array test

2007-01-02 Emanuele Ruffaldi <[email protected]>
- optimized encoding by replacing smart_str with chunked string builder
- fixed arrays in AMF3
- corrected reference counts

2006-12-27 Emanuele Ruffaldi <[email protected]>

- Initial version
21 changes: 21 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@


Windows
====================

For PHP4 use windows\php4\php_amf.dll and copy into ext folder of PHP
For PHP5 use windows\php5\php_amf.dll and copy into ext folder of PHP

Then update the php.ini with the line

extension=php_amf.dll


Linux/Others
====================

Build from sources and copy the amf.so library into the
ext folder of PHP (typically /usr/lib/php/modules).
The update php.ini under /etc

extension=amf.so
68 changes: 68 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
--------------------------------------------------------------------

Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact [email protected].

4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from [email protected]. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"

5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.

6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".

THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------

This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.

The PHP Group can be contacted via Email at [email protected].

For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.

PHP includes the Zend Engine, freely available at
<http://www.zend.com>.
66 changes: 66 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

amfext (native) 0.8.*
=====================

This extension implements the ActionScript Message Format
for encoding and decoding,both in AMF and AMF3 versions.
Information can be found in [0].

This extension provides two low level functions useful for
encoding and decoding objects into AMF format, but it does
not provide functions for managing the full message. An
example of implementation can be found in [1].

Details on the encoding process can be read in doc/encoding.txt

Documentation on the PHP function and the callbacks is in doc/amfextdoc.php

Constants for the flags that can be used in the encoding/decoding are in amfext.php
that can be included.

The directory tests contains some tests that can be invoked directly. Eventually drop AMFPHP
sources somewhere for testing the PHP version against the C version. See test_common.php for
details.

Building
-------------

Under Windows: download the source of your PHP version and unpack the zip under the
ext directory of the source. Open the associated Visual Studio project (amf4.dsp or amf5.dsp)
and just build. Everything should be fine. For distributing the extension is suggested to use
Visual Studio 6, otherwise 2003 is fine.

Under Uni*/Linux: obtain your php-devel package and unpack the zip in a directory. Then
as any PHP extension perform:

phpize
./configure --enable-amf
make install

Note: there could be some little problems if php includes are not under /usr

In any case remember to add the amf.so/php_amf.dll extension to the php.ini file

Known Builds
--------------

This code has been tested under Windows (PHP 4.4.0, 5.2.0) and Fedora (PHP 4.1.6) under a 32 bit machine.

Please check the behaviour with 64-bit machine

Thanks
---------------

Thanks to Patrick Mineault from AMF for the support, and from the authors
of the JSON PHP extension for the skeleton of the project.


Authors
-------

Emanuele Ruffaldi <[email protected]>

---

[0] http://osflash.org/doku.php?id=amf
[1] http://amfphp.sourceforge.net/
Loading

0 comments on commit b9e2af6

Please sign in to comment.