Subversion Repositories cryptochat

Compare Revisions

No changes between revisions

Regard whitespace Rev 1 → Rev 2

/trunk/dependencies/crc32-js-php/crc32.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/aes-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/aes.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/cipher-core-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/cipher-core.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/core-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/core.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/enc-base64-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/enc-base64.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/enc-utf16-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/enc-utf16.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/evpkdf-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/evpkdf.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/format-hex-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/format-hex.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/hmac-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/hmac.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/lib-typedarrays-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/lib-typedarrays.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/md5-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/md5.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-cfb-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-cfb.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ctr-gladman-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ctr-gladman.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ctr-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ctr.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ecb-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ecb.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ofb-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/mode-ofb.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-ansix923-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-ansix923.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-iso10126-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-iso10126.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-iso97971-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-iso97971.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-nopadding-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-nopadding.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-zeropadding-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pad-zeropadding.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pbkdf2-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/pbkdf2.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/rabbit-legacy-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/rabbit-legacy.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/rabbit-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/rabbit.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/rc4-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/rc4.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/ripemd160-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/ripemd160.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha1-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha1.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha224-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha224.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha256-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha256.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha3-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha3.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha384-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha384.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha512-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/sha512.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/tripledes-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/tripledes.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/x64-core-min.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/components/x64-core.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/aes.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-md5.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-ripemd160.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-sha1.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-sha224.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-sha256.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-sha3.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-sha384.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/hmac-sha512.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/md5.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/pbkdf2.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/rabbit-legacy.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/rabbit.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/rc4.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/ripemd160.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/sha1.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/sha224.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/sha256.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/sha3.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/sha384.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/sha512.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/cryptojs/rollups/tripledes.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/JSON.php
0,0 → 1,806
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Converts to and from JSON format.
*
* JSON (JavaScript Object Notation) is a lightweight data-interchange
* format. It is easy for humans to read and write. It is easy for machines
* to parse and generate. It is based on a subset of the JavaScript
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
* This feature can also be found in Python. JSON is a text format that is
* completely language independent but uses conventions that are familiar
* to programmers of the C-family of languages, including C, C++, C#, Java,
* JavaScript, Perl, TCL, and many others. These properties make JSON an
* ideal data-interchange language.
*
* This package provides a simple encoder and decoder for JSON notation. It
* is intended for use with client-side Javascript applications that make
* use of HTTPRequest to perform server communication functions - data can
* be encoded into JSON notation for use in a client-side javascript, or
* decoded from incoming Javascript requests. JSON format is native to
* Javascript, and can be directly eval()'ed with no further parsing
* overhead
*
* All strings should be in ASCII or UTF-8 format!
*
* LICENSE: Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met: Redistributions of source code must retain the
* above copyright notice, this list of conditions and the following
* disclaimer. 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.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS 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 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.
*
* @category
* @package Services_JSON
* @author Michal Migurski <mike-json@teczno.com>
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
* @copyright 2005 Michal Migurski
* @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
* @license http://www.opensource.org/licenses/bsd-license.php
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
*/
 
/**
* Marker constant for Services_JSON::decode(), used to flag stack state
*/
define('SERVICES_JSON_SLICE', 1);
 
/**
* Marker constant for Services_JSON::decode(), used to flag stack state
*/
define('SERVICES_JSON_IN_STR', 2);
 
/**
* Marker constant for Services_JSON::decode(), used to flag stack state
*/
define('SERVICES_JSON_IN_ARR', 3);
 
/**
* Marker constant for Services_JSON::decode(), used to flag stack state
*/
define('SERVICES_JSON_IN_OBJ', 4);
 
/**
* Marker constant for Services_JSON::decode(), used to flag stack state
*/
define('SERVICES_JSON_IN_CMT', 5);
 
/**
* Behavior switch for Services_JSON::decode()
*/
define('SERVICES_JSON_LOOSE_TYPE', 16);
 
/**
* Behavior switch for Services_JSON::decode()
*/
define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
 
/**
* Converts to and from JSON format.
*
* Brief example of use:
*
* <code>
* // create a new instance of Services_JSON
* $json = new Services_JSON();
*
* // convert a complexe value to JSON notation, and send it to the browser
* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
* $output = $json->encode($value);
*
* print($output);
* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
*
* // accept incoming POST data, assumed to be in JSON notation
* $input = file_get_contents('php://input', 1000000);
* $value = $json->decode($input);
* </code>
*/
class Services_JSON
{
/**
* constructs a new JSON instance
*
* @param int $use object behavior flags; combine with boolean-OR
*
* possible values:
* - SERVICES_JSON_LOOSE_TYPE: loose typing.
* "{...}" syntax creates associative arrays
* instead of objects in decode().
* - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
* Values which can't be encoded (e.g. resources)
* appear as NULL instead of throwing errors.
* By default, a deeply-nested resource will
* bubble up with an error, so all return values
* from encode() should be checked with isError()
*/
function Services_JSON($use = 0)
{
$this->use = $use;
}
 
/**
* convert a string from one UTF-16 char to one UTF-8 char
*
* Normally should be handled by mb_convert_encoding, but
* provides a slower PHP-only method for installations
* that lack the multibye string extension.
*
* @param string $utf16 UTF-16 character
* @return string UTF-8 character
* @access private
*/
function utf162utf8($utf16)
{
// oh please oh please oh please oh please oh please
if(function_exists('mb_convert_encoding')) {
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
}
 
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
 
switch(true) {
case ((0x7F & $bytes) == $bytes):
// this case should never be reached, because we are in ASCII range
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr(0x7F & $bytes);
 
case (0x07FF & $bytes) == $bytes:
// return a 2-byte UTF-8 character
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr(0xC0 | (($bytes >> 6) & 0x1F))
. chr(0x80 | ($bytes & 0x3F));
 
case (0xFFFF & $bytes) == $bytes:
// return a 3-byte UTF-8 character
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr(0xE0 | (($bytes >> 12) & 0x0F))
. chr(0x80 | (($bytes >> 6) & 0x3F))
. chr(0x80 | ($bytes & 0x3F));
}
 
// ignoring UTF-32 for now, sorry
return '';
}
 
/**
* convert a string from one UTF-8 char to one UTF-16 char
*
* Normally should be handled by mb_convert_encoding, but
* provides a slower PHP-only method for installations
* that lack the multibye string extension.
*
* @param string $utf8 UTF-8 character
* @return string UTF-16 character
* @access private
*/
function utf82utf16($utf8)
{
// oh please oh please oh please oh please oh please
if(function_exists('mb_convert_encoding')) {
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
}
 
switch(strlen($utf8)) {
case 1:
// this case should never be reached, because we are in ASCII range
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return $utf8;
 
case 2:
// return a UTF-16 character from a 2-byte UTF-8 char
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr(0x07 & (ord($utf8{0}) >> 2))
. chr((0xC0 & (ord($utf8{0}) << 6))
| (0x3F & ord($utf8{1})));
 
case 3:
// return a UTF-16 character from a 3-byte UTF-8 char
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr((0xF0 & (ord($utf8{0}) << 4))
| (0x0F & (ord($utf8{1}) >> 2)))
. chr((0xC0 & (ord($utf8{1}) << 6))
| (0x7F & ord($utf8{2})));
}
 
// ignoring UTF-32 for now, sorry
return '';
}
 
/**
* encodes an arbitrary variable into JSON format
*
* @param mixed $var any number, boolean, string, array, or object to be encoded.
* see argument 1 to Services_JSON() above for array-parsing behavior.
* if var is a strng, note that encode() always expects it
* to be in ASCII or UTF-8 format!
*
* @return mixed JSON string representation of input var or an error if a problem occurs
* @access public
*/
function encode($var)
{
switch (gettype($var)) {
case 'boolean':
return $var ? 'true' : 'false';
 
case 'NULL':
return 'null';
 
case 'integer':
return (int) $var;
 
case 'double':
case 'float':
return (float) $var;
 
case 'string':
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
$ascii = '';
$strlen_var = strlen($var);
 
/*
* Iterate over every character in the string,
* escaping with a slash or encoding to UTF-8 where necessary
*/
for ($c = 0; $c < $strlen_var; ++$c) {
 
$ord_var_c = ord($var{$c});
 
switch (true) {
case $ord_var_c == 0x08:
$ascii .= '\b';
break;
case $ord_var_c == 0x09:
$ascii .= '\t';
break;
case $ord_var_c == 0x0A:
$ascii .= '\n';
break;
case $ord_var_c == 0x0C:
$ascii .= '\f';
break;
case $ord_var_c == 0x0D:
$ascii .= '\r';
break;
 
case $ord_var_c == 0x22:
case $ord_var_c == 0x2F:
case $ord_var_c == 0x5C:
// double quote, slash, slosh
$ascii .= '\\'.$var{$c};
break;
 
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
// characters U-00000000 - U-0000007F (same as ASCII)
$ascii .= $var{$c};
break;
 
case (($ord_var_c & 0xE0) == 0xC0):
// characters U-00000080 - U-000007FF, mask 110XXXXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c, ord($var{$c + 1}));
$c += 1;
$utf16 = $this->utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
 
case (($ord_var_c & 0xF0) == 0xE0):
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($var{$c + 1}),
ord($var{$c + 2}));
$c += 2;
$utf16 = $this->utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
 
case (($ord_var_c & 0xF8) == 0xF0):
// characters U-00010000 - U-001FFFFF, mask 11110XXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($var{$c + 1}),
ord($var{$c + 2}),
ord($var{$c + 3}));
$c += 3;
$utf16 = $this->utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
 
case (($ord_var_c & 0xFC) == 0xF8):
// characters U-00200000 - U-03FFFFFF, mask 111110XX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($var{$c + 1}),
ord($var{$c + 2}),
ord($var{$c + 3}),
ord($var{$c + 4}));
$c += 4;
$utf16 = $this->utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
 
case (($ord_var_c & 0xFE) == 0xFC):
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($var{$c + 1}),
ord($var{$c + 2}),
ord($var{$c + 3}),
ord($var{$c + 4}),
ord($var{$c + 5}));
$c += 5;
$utf16 = $this->utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
}
}
 
return '"'.$ascii.'"';
 
case 'array':
/*
* As per JSON spec if any array key is not an integer
* we must treat the the whole array as an object. We
* also try to catch a sparsely populated associative
* array with numeric keys here because some JS engines
* will create an array with empty indexes up to
* max_index which can cause memory issues and because
* the keys, which may be relevant, will be remapped
* otherwise.
*
* As per the ECMA and JSON specification an object may
* have any string as a property. Unfortunately due to
* a hole in the ECMA specification if the key is a
* ECMA reserved word or starts with a digit the
* parameter is only accessible using ECMAScript's
* bracket notation.
*/
 
// treat as a JSON object
if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
$properties = array_map(array($this, 'name_value'),
array_keys($var),
array_values($var));
 
foreach($properties as $property) {
if(Services_JSON::isError($property)) {
return $property;
}
}
 
return '{' . join(',', $properties) . '}';
}
 
// treat it like a regular array
$elements = array_map(array($this, 'encode'), $var);
 
foreach($elements as $element) {
if(Services_JSON::isError($element)) {
return $element;
}
}
 
return '[' . join(',', $elements) . ']';
 
case 'object':
$vars = get_object_vars($var);
 
$properties = array_map(array($this, 'name_value'),
array_keys($vars),
array_values($vars));
 
foreach($properties as $property) {
if(Services_JSON::isError($property)) {
return $property;
}
}
 
return '{' . join(',', $properties) . '}';
 
default:
return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
? 'null'
: new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
}
}
 
/**
* array-walking function for use in generating JSON-formatted name-value pairs
*
* @param string $name name of key to use
* @param mixed $value reference to an array element to be encoded
*
* @return string JSON-formatted name-value pair, like '"name":value'
* @access private
*/
function name_value($name, $value)
{
$encoded_value = $this->encode($value);
 
if(Services_JSON::isError($encoded_value)) {
return $encoded_value;
}
 
return $this->encode(strval($name)) . ':' . $encoded_value;
}
 
/**
* reduce a string by removing leading and trailing comments and whitespace
*
* @param $str string string value to strip of comments and whitespace
*
* @return string string value stripped of comments and whitespace
* @access private
*/
function reduce_string($str)
{
$str = preg_replace(array(
 
// eliminate single line comments in '// ...' form
'#^\s*//(.+)$#m',
 
// eliminate multi-line comments in '/* ... */' form, at start of string
'#^\s*/\*(.+)\*/#Us',
 
// eliminate multi-line comments in '/* ... */' form, at end of string
'#/\*(.+)\*/\s*$#Us'
 
), '', $str);
 
// eliminate extraneous space
return trim($str);
}
 
/**
* decodes a JSON string into appropriate variable
*
* @param string $str JSON-formatted string
*
* @return mixed number, boolean, string, array, or object
* corresponding to given JSON input string.
* See argument 1 to Services_JSON() above for object-output behavior.
* Note that decode() always returns strings
* in ASCII or UTF-8 format!
* @access public
*/
function decode($str)
{
$str = $this->reduce_string($str);
 
switch (strtolower($str)) {
case 'true':
return true;
 
case 'false':
return false;
 
case 'null':
return null;
 
default:
$m = array();
 
if (is_numeric($str)) {
// Lookie-loo, it's a number
 
// This would work on its own, but I'm trying to be
// good about returning integers where appropriate:
// return (float)$str;
 
// Return float or int, as appropriate
return ((float)$str == (integer)$str)
? (integer)$str
: (float)$str;
 
} elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
// STRINGS RETURNED IN UTF-8 FORMAT
$delim = substr($str, 0, 1);
$chrs = substr($str, 1, -1);
$utf8 = '';
$strlen_chrs = strlen($chrs);
 
for ($c = 0; $c < $strlen_chrs; ++$c) {
 
$substr_chrs_c_2 = substr($chrs, $c, 2);
$ord_chrs_c = ord($chrs{$c});
 
switch (true) {
case $substr_chrs_c_2 == '\b':
$utf8 .= chr(0x08);
++$c;
break;
case $substr_chrs_c_2 == '\t':
$utf8 .= chr(0x09);
++$c;
break;
case $substr_chrs_c_2 == '\n':
$utf8 .= chr(0x0A);
++$c;
break;
case $substr_chrs_c_2 == '\f':
$utf8 .= chr(0x0C);
++$c;
break;
case $substr_chrs_c_2 == '\r':
$utf8 .= chr(0x0D);
++$c;
break;
 
case $substr_chrs_c_2 == '\\"':
case $substr_chrs_c_2 == '\\\'':
case $substr_chrs_c_2 == '\\\\':
case $substr_chrs_c_2 == '\\/':
if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
($delim == "'" && $substr_chrs_c_2 != '\\"')) {
$utf8 .= $chrs{++$c};
}
break;
 
case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
// single, escaped unicode character
$utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
. chr(hexdec(substr($chrs, ($c + 4), 2)));
$utf8 .= $this->utf162utf8($utf16);
$c += 5;
break;
 
case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
$utf8 .= $chrs{$c};
break;
 
case ($ord_chrs_c & 0xE0) == 0xC0:
// characters U-00000080 - U-000007FF, mask 110XXXXX
//see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 2);
++$c;
break;
 
case ($ord_chrs_c & 0xF0) == 0xE0:
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 3);
$c += 2;
break;
 
case ($ord_chrs_c & 0xF8) == 0xF0:
// characters U-00010000 - U-001FFFFF, mask 11110XXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 4);
$c += 3;
break;
 
case ($ord_chrs_c & 0xFC) == 0xF8:
// characters U-00200000 - U-03FFFFFF, mask 111110XX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 5);
$c += 4;
break;
 
case ($ord_chrs_c & 0xFE) == 0xFC:
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 6);
$c += 5;
break;
 
}
 
}
 
return $utf8;
 
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
// array, or object notation
 
if ($str{0} == '[') {
$stk = array(SERVICES_JSON_IN_ARR);
$arr = array();
} else {
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
$stk = array(SERVICES_JSON_IN_OBJ);
$obj = array();
} else {
$stk = array(SERVICES_JSON_IN_OBJ);
$obj = new stdClass();
}
}
 
array_push($stk, array('what' => SERVICES_JSON_SLICE,
'where' => 0,
'delim' => false));
 
$chrs = substr($str, 1, -1);
$chrs = $this->reduce_string($chrs);
 
if ($chrs == '') {
if (reset($stk) == SERVICES_JSON_IN_ARR) {
return $arr;
 
} else {
return $obj;
 
}
}
 
//print("\nparsing {$chrs}\n");
 
$strlen_chrs = strlen($chrs);
 
for ($c = 0; $c <= $strlen_chrs; ++$c) {
 
$top = end($stk);
$substr_chrs_c_2 = substr($chrs, $c, 2);
 
if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
// found a comma that is not inside a string, array, etc.,
// OR we've reached the end of the character list
$slice = substr($chrs, $top['where'], ($c - $top['where']));
array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
//print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
 
if (reset($stk) == SERVICES_JSON_IN_ARR) {
// we are in an array, so just push an element onto the stack
array_push($arr, $this->decode($slice));
 
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
// we are in an object, so figure
// out the property name and set an
// element in an associative array,
// for now
$parts = array();
if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
// "name":value pair
$key = $this->decode($parts[1]);
$val = $this->decode($parts[2]);
 
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
$obj[$key] = $val;
} else {
$obj->$key = $val;
}
} elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
// name:value pair, where name is unquoted
$key = $parts[1];
$val = $this->decode($parts[2]);
 
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
$obj[$key] = $val;
} else {
$obj->$key = $val;
}
}
 
}
 
} elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
// found a quote, and we are not inside a string
array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
//print("Found start of string at {$c}\n");
 
} elseif (($chrs{$c} == $top['delim']) &&
($top['what'] == SERVICES_JSON_IN_STR) &&
((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
// found a quote, we're in a string, and it's not escaped
// we know that it's not escaped becase there is _not_ an
// odd number of backslashes at the end of the string so far
array_pop($stk);
//print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
 
} elseif (($chrs{$c} == '[') &&
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
// found a left-bracket, and we are in an array, object, or slice
array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
//print("Found start of array at {$c}\n");
 
} elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
// found a right-bracket, and we're in an array
array_pop($stk);
//print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
 
} elseif (($chrs{$c} == '{') &&
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
// found a left-brace, and we are in an array, object, or slice
array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
//print("Found start of object at {$c}\n");
 
} elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
// found a right-brace, and we're in an object
array_pop($stk);
//print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
 
} elseif (($substr_chrs_c_2 == '/*') &&
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
// found a comment start, and we are in an array, object, or slice
array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
$c++;
//print("Found start of comment at {$c}\n");
 
} elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
// found a comment end, and we're in one now
array_pop($stk);
$c++;
 
for ($i = $top['where']; $i <= $c; ++$i)
$chrs = substr_replace($chrs, ' ', $i, 1);
 
//print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
 
}
 
}
 
if (reset($stk) == SERVICES_JSON_IN_ARR) {
return $arr;
 
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
return $obj;
 
}
 
}
}
}
 
/**
* @todo Ultimately, this should just call PEAR::isError()
*/
function isError($data, $code = null)
{
if (class_exists('pear')) {
return PEAR::isError($data, $code);
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
is_subclass_of($data, 'services_json_error'))) {
return true;
}
 
return false;
}
}
 
if (class_exists('PEAR_Error')) {
 
class Services_JSON_Error extends PEAR_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
}
}
 
} else {
 
/**
* @todo Ultimately, this class shall be descended from PEAR_Error
*/
class Services_JSON_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
 
}
}
 
}
?>
/trunk/dependencies/jsonwrapper/JSON/LICENSE
0,0 → 1,21
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
 
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
 
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.
 
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS 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 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.
/trunk/dependencies/jsonwrapper/JSON/Test-JSON.php
0,0 → 1,521
<?php
// $Id: Test-JSON.php,v 1.28 2006/06/28 05:54:17 migurski Exp $
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Unit tests for Services_JSON.
* @see JSON.php
*
* @category
* @package Services_JSON
* @author Michal Migurski <mike-json@teczno.com>
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
* @copyright 2005 Michal Migurski
* @version CVS: $Id: Test-JSON.php,v 1.28 2006/06/28 05:54:17 migurski Exp $
* @license http://www.opensource.org/licenses/bsd-license.php
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
*/
 
error_reporting(E_ALL);
 
require_once 'PHPUnit.php';
require_once 'JSON.php';
 
class Services_JSON_EncDec_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_EncDec_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json = new Services_JSON();
 
$obj = new stdClass();
$obj->a_string = '"he":llo}:{world';
$obj->an_array = array(1, 2, 3);
$obj->obj = new stdClass();
$obj->obj->a_number = 123;
 
$this->obj = $obj;
$this->obj_j = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"obj":{"a_number":123}}';
$this->obj_d = 'object with properties, nested object and arrays';
 
$this->arr = array(null, true, array(1, 2, 3), "hello\"],[world!");
$this->arr_j = '[null,true,[1,2,3],"hello\"],[world!"]';
$this->arr_d = 'array with elements and nested arrays';
 
$this->str1 = 'hello world';
$this->str1_j = '"hello world"';
$this->str1_j_ = "'hello world'";
$this->str1_d = 'hello world';
$this->str1_d_ = 'hello world, double quotes';
 
$this->str2 = "hello\t\"world\"";
$this->str2_j = '"hello\\t\\"world\\""';
$this->str2_d = 'hello world, with tab, double-quotes';
 
$this->str3 = "\\\r\n\t\"/";
$this->str3_j = '"\\\\\\r\\n\\t\\"\\/"';
$this->str3_d = 'backslash, return, newline, tab, double-quote';
 
$this->str4 = 'héllö wørłd';
$this->str4_j = '"h\u00e9ll\u00f6 w\u00f8r\u0142d"';
$this->str4_j_ = '"héllö wørłd"';
$this->str4_d = 'hello world, with unicode';
}
 
function test_to_JSON()
{
$this->assertEquals('null', $this->json->encode(null), 'type case: null');
$this->assertEquals('true', $this->json->encode(true), 'type case: boolean true');
$this->assertEquals('false', $this->json->encode(false), 'type case: boolean false');
 
$this->assertEquals('1', $this->json->encode(1), 'numeric case: 1');
$this->assertEquals('-1', $this->json->encode(-1), 'numeric case: -1');
$this->assertEquals('1.000000', $this->json->encode(1.0), 'numeric case: 1.0');
$this->assertEquals('1.100000', $this->json->encode(1.1), 'numeric case: 1.1');
 
$this->assertEquals($this->str1_j, $this->json->encode($this->str1), "string case: {$this->str1_d}");
$this->assertEquals($this->str2_j, $this->json->encode($this->str2), "string case: {$this->str2_d}");
$this->assertEquals($this->str3_j, $this->json->encode($this->str3), "string case: {$this->str3_d}");
$this->assertEquals($this->str4_j, $this->json->encode($this->str4), "string case: {$this->str4_d}");
 
$this->assertEquals($this->arr_j, $this->json->encode($this->arr), "array case: {$this->arr_d}");
$this->assertEquals($this->obj_j, $this->json->encode($this->obj), "object case: {$this->obj_d}");
}
 
function test_from_JSON()
{
$this->assertEquals(null, $this->json->decode('null'), 'type case: null');
$this->assertEquals(true, $this->json->decode('true'), 'type case: boolean true');
$this->assertEquals(false, $this->json->decode('false'), 'type case: boolean false');
 
$this->assertEquals(1, $this->json->decode('1'), 'numeric case: 1');
$this->assertEquals(-1, $this->json->decode('-1'), 'numeric case: -1');
$this->assertEquals(1.0, $this->json->decode('1.0'), 'numeric case: 1.0');
$this->assertEquals(1.1, $this->json->decode('1.1'), 'numeric case: 1.1');
 
$this->assertEquals(11.0, $this->json->decode('1.1e1'), 'numeric case: 1.1e1');
$this->assertEquals(11.0, $this->json->decode('1.10e+1'), 'numeric case: 1.10e+1');
$this->assertEquals(0.11, $this->json->decode('1.1e-1'), 'numeric case: 1.1e-1');
$this->assertEquals(-0.11, $this->json->decode('-1.1e-1'), 'numeric case: -1.1e-1');
 
$this->assertEquals($this->str1, $this->json->decode($this->str1_j), "string case: {$this->str1_d}");
$this->assertEquals($this->str1, $this->json->decode($this->str1_j_), "string case: {$this->str1_d_}");
$this->assertEquals($this->str2, $this->json->decode($this->str2_j), "string case: {$this->str2_d}");
$this->assertEquals($this->str3, $this->json->decode($this->str3_j), "string case: {$this->str3_d}");
$this->assertEquals($this->str4, $this->json->decode($this->str4_j), "string case: {$this->str4_d}");
$this->assertEquals($this->str4, $this->json->decode($this->str4_j_), "string case: {$this->str4_d}");
 
$this->assertEquals($this->arr, $this->json->decode($this->arr_j), "array case: {$this->arr_d}");
$this->assertEquals($this->obj, $this->json->decode($this->obj_j), "object case: {$this->obj_d}");
}
 
function test_to_then_from_JSON()
{
$this->assertEquals(null, $this->json->decode($this->json->encode(null)), 'type case: null');
$this->assertEquals(true, $this->json->decode($this->json->encode(true)), 'type case: boolean true');
$this->assertEquals(false, $this->json->decode($this->json->encode(false)), 'type case: boolean false');
 
$this->assertEquals(1, $this->json->decode($this->json->encode(1)), 'numeric case: 1');
$this->assertEquals(-1, $this->json->decode($this->json->encode(-1)), 'numeric case: -1');
$this->assertEquals(1.0, $this->json->decode($this->json->encode(1.0)), 'numeric case: 1.0');
$this->assertEquals(1.1, $this->json->decode($this->json->encode(1.1)), 'numeric case: 1.1');
 
$this->assertEquals($this->str1, $this->json->decode($this->json->encode($this->str1)), "string case: {$this->str1_d}");
$this->assertEquals($this->str2, $this->json->decode($this->json->encode($this->str2)), "string case: {$this->str2_d}");
$this->assertEquals($this->str3, $this->json->decode($this->json->encode($this->str3)), "string case: {$this->str3_d}");
$this->assertEquals($this->str4, $this->json->decode($this->json->encode($this->str4)), "string case: {$this->str4_d}");
 
$this->assertEquals($this->arr, $this->json->decode($this->json->encode($this->arr)), "array case: {$this->arr_d}");
$this->assertEquals($this->obj, $this->json->decode($this->json->encode($this->obj)), "object case: {$this->obj_d}");
}
 
function test_from_then_to_JSON()
{
$this->assertEquals('null', $this->json->encode($this->json->decode('null')), 'type case: null');
$this->assertEquals('true', $this->json->encode($this->json->decode('true')), 'type case: boolean true');
$this->assertEquals('false', $this->json->encode($this->json->decode('false')), 'type case: boolean false');
 
$this->assertEquals('1', $this->json->encode($this->json->decode('1')), 'numeric case: 1');
$this->assertEquals('-1', $this->json->encode($this->json->decode('-1')), 'numeric case: -1');
$this->assertEquals('1.0', $this->json->encode($this->json->decode('1.0')), 'numeric case: 1.0');
$this->assertEquals('1.1', $this->json->encode($this->json->decode('1.1')), 'numeric case: 1.1');
 
$this->assertEquals($this->str1_j, $this->json->encode($this->json->decode($this->str1_j)), "string case: {$this->str1_d}");
$this->assertEquals($this->str2_j, $this->json->encode($this->json->decode($this->str2_j)), "string case: {$this->str2_d}");
$this->assertEquals($this->str3_j, $this->json->encode($this->json->decode($this->str3_j)), "string case: {$this->str3_d}");
$this->assertEquals($this->str4_j, $this->json->encode($this->json->decode($this->str4_j)), "string case: {$this->str4_d}");
$this->assertEquals($this->str4_j, $this->json->encode($this->json->decode($this->str4_j_)), "string case: {$this->str4_d}");
 
$this->assertEquals($this->arr_j, $this->json->encode($this->json->decode($this->arr_j)), "array case: {$this->arr_d}");
$this->assertEquals($this->obj_j, $this->json->encode($this->json->decode($this->obj_j)), "object case: {$this->obj_d}");
}
}
 
class Services_JSON_AssocArray_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_AssocArray_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json_l = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$this->json_s = new Services_JSON();
 
$this->arr = array('car1'=> array('color'=> 'tan', 'model' => 'sedan'),
'car2' => array('color' => 'red', 'model' => 'sports'));
$this->arr_jo = '{"car1":{"color":"tan","model":"sedan"},"car2":{"color":"red","model":"sports"}}';
$this->arr_d = 'associative array with nested associative arrays';
 
$this->arn = array(0=> array(0=> 'tan\\', 'model\\' => 'sedan'), 1 => array(0 => 'red', 'model' => 'sports'));
$this->arn_ja = '[{"0":"tan\\\\","model\\\\":"sedan"},{"0":"red","model":"sports"}]';
$this->arn_d = 'associative array with nested associative arrays, and some numeric keys thrown in';
 
$this->arrs = array (1 => 'one', 2 => 'two', 5 => 'five');
$this->arrs_jo = '{"1":"one","2":"two","5":"five"}';
$this->arrs_d = 'associative array numeric keys which are not fully populated in a range of 0 to length-1';
}
 
function test_type()
{
$this->assertEquals('array', gettype($this->json_l->decode($this->arn_ja)), "loose type should be array");
$this->assertEquals('array', gettype($this->json_s->decode($this->arn_ja)), "strict type should be array");
}
 
function test_to_JSON()
{
// both strict and loose JSON should result in an object
$this->assertEquals($this->arr_jo, $this->json_l->encode($this->arr), "array case - loose: {$this->arr_d}");
$this->assertEquals($this->arr_jo, $this->json_s->encode($this->arr), "array case - strict: {$this->arr_d}");
 
// ...unless the input array has some numeric indeces, in which case the behavior is to degrade to a regular array
$this->assertEquals($this->arn_ja, $this->json_s->encode($this->arn), "array case - strict: {$this->arn_d}");
 
// Test a sparsely populated numerically indexed associative array
$this->assertEquals($this->arrs_jo, $this->json_l->encode($this->arrs), "sparse numeric assoc array: {$this->arrs_d}");
}
 
function test_to_then_from_JSON()
{
// these tests motivated by a bug in which strings that end
// with backslashes followed by quotes were incorrectly decoded.
foreach(array('\\"', '\\\\"', '\\"\\"', '\\""\\""', '\\\\"\\\\"') as $v) {
$this->assertEquals(array($v), $this->json_l->decode($this->json_l->encode(array($v))));
$this->assertEquals(array('a' => $v), $this->json_l->decode($this->json_l->encode(array('a' => $v))));
}
}
}
 
class Services_JSON_NestedArray_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_NestedArray_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
 
$this->str1 = '[{"this":"that"}]';
$this->arr1 = array(array('this' => 'that'));
 
$this->str2 = '{"this":["that"]}';
$this->arr2 = array('this' => array('that'));
 
$this->str3 = '{"params":[{"foo":["1"],"bar":"1"}]}';
$this->arr3 = array('params' => array(array('foo' => array('1'), 'bar' => '1')));
 
$this->str4 = '{"0": {"foo": "bar", "baz": "winkle"}}';
$this->arr4 = array('0' => array('foo' => 'bar', 'baz' => 'winkle'));
 
$this->str5 = '{"params":[{"options": {"old": [ ], "new": {"0": {"elements": {"old": [], "new": {"0": {"elementName": "aa", "isDefault": false, "elementRank": "0", "priceAdjust": "0", "partNumber": ""}}}, "optionName": "aa", "isRequired": false, "optionDesc": null}}}}]}';
$this->arr5 = array (
'params' => array (
0 => array (
'options' =>
array (
'old' => array(),
'new' => array (
0 => array (
'elements' => array (
'old' => array(),
'new' => array (
0 => array (
'elementName' => 'aa',
'isDefault' => false,
'elementRank' => '0',
'priceAdjust' => '0',
'partNumber' => '',
),
),
),
'optionName' => 'aa',
'isRequired' => false,
'optionDesc' => NULL,
),
),
),
),
),
);
}
 
function test_type()
{
$this->assertEquals('array', gettype($this->json->decode($this->str1)), "loose type should be array");
$this->assertEquals('array', gettype($this->json->decode($this->str2)), "loose type should be array");
$this->assertEquals('array', gettype($this->json->decode($this->str3)), "loose type should be array");
}
 
function test_from_JSON()
{
$this->assertEquals($this->arr1, $this->json->decode($this->str1), "simple compactly-nested array");
$this->assertEquals($this->arr2, $this->json->decode($this->str2), "simple compactly-nested array");
$this->assertEquals($this->arr3, $this->json->decode($this->str3), "complex compactly nested array");
$this->assertEquals($this->arr4, $this->json->decode($this->str4), "complex compactly nested array");
$this->assertEquals($this->arr5, $this->json->decode($this->str5), "super complex compactly nested array");
}
 
function _test_from_JSON()
{
$super = '{"params":[{"options": {"old": {}, "new": {"0": {"elements": {"old": {}, "new": {"0": {"elementName": "aa", "isDefault": false, "elementRank": "0", "priceAdjust": "0", "partNumber": ""}}}, "optionName": "aa", "isRequired": false, "optionDesc": ""}}}}]}';
print("trying {$super}...\n");
print var_export($this->json->decode($super));
}
}
 
class Services_JSON_Object_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_Object_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json_l = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$this->json_s = new Services_JSON();
 
$this->obj_j = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"obj":{"a_number":123}}';
 
$this->obj1->car1->color = 'tan';
$this->obj1->car1->model = 'sedan';
$this->obj1->car2->color = 'red';
$this->obj1->car2->model = 'sports';
$this->obj1_j = '{"car1":{"color":"tan","model":"sedan"},"car2":{"color":"red","model":"sports"}}';
$this->obj1_d = 'Object with nested objects';
}
 
function test_type()
{
$this->assertEquals('object', gettype($this->json_s->decode($this->obj_j)), "checking whether decoded type is object");
$this->assertEquals('array', gettype($this->json_l->decode($this->obj_j)), "checking whether decoded type is array");
}
 
function test_to_JSON()
{
$this->assertEquals($this->obj1_j, $this->json_s->encode($this->obj1), "object - strict: {$this->obj1_d}");
$this->assertEquals($this->obj1_j, $this->json_l->encode($this->obj1), "object - loose: {$this->obj1_d}");
}
 
function test_from_then_to_JSON()
{
$this->assertEquals($this->obj_j, $this->json_s->encode($this->json_s->decode($this->obj_j)), "object case");
$this->assertEquals($this->obj_j, $this->json_l->encode($this->json_l->decode($this->obj_j)), "array case");
}
}
 
class Services_JSON_Spaces_Comments_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_Spaces_Comments_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
 
$this->obj_j = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"obj":{"a_number":123}}';
 
$this->obj_js = '{"a_string": "\"he\":llo}:{world",
"an_array":[1, 2, 3],
"obj": {"a_number":123}}';
 
$this->obj_jc1 = '{"a_string": "\"he\":llo}:{world",
// here is a comment, hoorah
"an_array":[1, 2, 3],
"obj": {"a_number":123}}';
 
$this->obj_jc2 = '/* this here is the sneetch */ "the sneetch"
// this has been the sneetch.';
 
$this->obj_jc3 = '{"a_string": "\"he\":llo}:{world",
/* here is a comment, hoorah */
"an_array":[1, 2, 3 /* and here is another */],
"obj": {"a_number":123}}';
 
$this->obj_jc4 = '{\'a_string\': "\"he\":llo}:{world",
/* here is a comment, hoorah */
\'an_array\':[1, 2, 3 /* and here is another */],
"obj": {"a_number":123}}';
}
 
function test_spaces()
{
$this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_js), "checking whether notation with spaces works");
}
 
function test_comments()
{
$this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_jc1), "checking whether notation with single line comments works");
$this->assertEquals('the sneetch', $this->json->decode($this->obj_jc2), "checking whether notation with multiline comments works");
$this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_jc3), "checking whether notation with multiline comments works");
$this->assertEquals($this->json->decode($this->obj_j), $this->json->decode($this->obj_jc4), "checking whether notation with single-quotes and multiline comments works");
}
}
 
class Services_JSON_Empties_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_Empties_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json_l = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$this->json_s = new Services_JSON();
 
$this->obj0_j = '{}';
$this->arr0_j = '[]';
 
$this->obj1_j = '{ }';
$this->arr1_j = '[ ]';
 
$this->obj2_j = '{ /* comment inside */ }';
$this->arr2_j = '[ /* comment inside */ ]';
}
 
function test_type()
{
$this->assertEquals('array', gettype($this->json_l->decode($this->arr0_j)), "should be array");
$this->assertEquals('object', gettype($this->json_s->decode($this->obj0_j)), "should be object");
 
$this->assertEquals(0, count($this->json_l->decode($this->arr0_j)), "should be empty array");
$this->assertEquals(0, count(get_object_vars($this->json_s->decode($this->obj0_j))), "should be empty object");
 
$this->assertEquals('array', gettype($this->json_l->decode($this->arr1_j)), "should be array, even with space");
$this->assertEquals('object', gettype($this->json_s->decode($this->obj1_j)), "should be object, even with space");
 
$this->assertEquals(0, count($this->json_l->decode($this->arr1_j)), "should be empty array, even with space");
$this->assertEquals(0, count(get_object_vars($this->json_s->decode($this->obj1_j))), "should be empty object, even with space");
 
$this->assertEquals('array', gettype($this->json_l->decode($this->arr2_j)), "should be array, despite comment");
$this->assertEquals('object', gettype($this->json_s->decode($this->obj2_j)), "should be object, despite comment");
 
$this->assertEquals(0, count($this->json_l->decode($this->arr2_j)), "should be empty array, despite comment");
$this->assertEquals(0, count(get_object_vars($this->json_s->decode($this->obj2_j))), "should be empty object, despite commentt");
}
}
 
class Services_JSON_UnquotedKeys_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_UnquotedKeys_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
 
$this->arn = array(0=> array(0=> 'tan', 'model' => 'sedan'), 1 => array(0 => 'red', 'model' => 'sports'));
$this->arn_ja = '[{0:"tan","model":"sedan"},{"0":"red",model:"sports"}]';
$this->arn_d = 'associative array with unquoted keys, nested associative arrays, and some numeric keys thrown in';
 
$this->arrs = array (1 => 'one', 2 => 'two', 5 => 'fi"ve');
$this->arrs_jo = '{"1":"one",2:"two","5":\'fi"ve\'}';
$this->arrs_d = 'associative array with unquoted keys, single-quoted values, numeric keys which are not fully populated in a range of 0 to length-1';
}
 
function test_from_JSON()
{
// ...unless the input array has some numeric indeces, in which case the behavior is to degrade to a regular array
$this->assertEquals($this->arn, $this->json->decode($this->arn_ja), "array case - strict: {$this->arn_d}");
 
// Test a sparsely populated numerically indexed associative array
$this->assertEquals($this->arrs, $this->json->decode($this->arrs_jo), "sparse numeric assoc array: {$this->arrs_d}");
}
}
 
class Services_JSON_ErrorSuppression_TestCase extends PHPUnit_TestCase {
 
function Services_JSON_ErrorSuppression_TestCase($name) {
$this->PHPUnit_TestCase($name);
}
 
function setUp() {
$this->json = new Services_JSON();
$this->json_ = new Services_JSON(SERVICES_JSON_SUPPRESS_ERRORS);
 
$this->res = tmpfile();
$this->res_j_ = 'null';
$this->res_d = 'naked resource';
 
$this->arr = array('a', 1, tmpfile());
$this->arr_j_ = '["a",1,null]';
$this->arr_d = 'array with string, number and resource';
 
$obj = new stdClass();
$obj->a_string = '"he":llo}:{world';
$obj->an_array = array(1, 2, 3);
$obj->resource = tmpfile();
 
$this->obj = $obj;
$this->obj_j_ = '{"a_string":"\"he\":llo}:{world","an_array":[1,2,3],"resource":null}';
$this->obj_d = 'object with properties, array, and nested resource';
}
 
function test_to_JSON()
{
$this->assertTrue(Services_JSON::isError($this->json->encode($this->res)), "resource case: {$this->res_d}");
$this->assertTrue(Services_JSON::isError($this->json->encode($this->arr)), "array case: {$this->arr_d}");
$this->assertTrue(Services_JSON::isError($this->json->encode($this->obj)), "object case: {$this->obj_d}");
}
 
function test_to_JSON_suppressed()
{
$this->assertEquals($this->res_j_, $this->json_->encode($this->res), "resource case: {$this->res_d}");
$this->assertEquals($this->arr_j_, $this->json_->encode($this->arr), "array case: {$this->arr_d}");
$this->assertEquals($this->obj_j_, $this->json_->encode($this->obj), "object case: {$this->obj_d}");
}
}
 
$suite = new PHPUnit_TestSuite('Services_JSON_EncDec_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_AssocArray_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_NestedArray_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_Object_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_Spaces_Comments_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_Empties_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_UnquotedKeys_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
$suite = new PHPUnit_TestSuite('Services_JSON_ErrorSuppression_TestCase');
$result = PHPUnit::run($suite);
echo $result->toString();
 
?>
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON.html
0,0 → 1,210
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts to and from JSON format.</p>
<p class="description"><p>Brief example of use:</p><p><pre><code><pre><br />1 <span class="src-comm">// create a new instance of Services_JSON</span><br />2 <span class="src-var">$json</span> = <span class="src-key">new</span> <a href="../Services_JSON/Services_JSON.html#methodServices_JSON">Services_JSON</a><span class="src-sym">(</span><span class="src-sym">)</span>;<br />3 <br />4 <span class="src-comm">// convert a complexe value to JSON notation, and send it to the browser</span><br />5 <span class="src-var">$value</span> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,</span> <span class="src-str">'bar'</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,</span> <span class="src-num">2</span><span class="src-sym">,</span> <span class="src-str">'baz'</span><span class="src-sym">)</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">3</span><span class="src-sym">,</span> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">)</span><span class="src-sym">)</span>;<br />6 <span class="src-var">$output</span> = <span class="src-var">$json</span><span class="src-sym">-&gt;</span><a href="../Services_JSON/Services_JSON.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span>;<br />7 <br />8 print<span class="src-sym">(</span><span class="src-var">$output</span><span class="src-sym">)</span>;<br />9 <span class="src-comm">// prints: [&quot;foo&quot;,&quot;bar&quot;,[1,2,&quot;baz&quot;],[3,[4]]]</span><br />10 <br />11 <span class="src-comm">// accept incoming POST data, assumed to be in JSON notation</span><br />12 <span class="src-var">$input</span> = <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-str">'php://input'</span><span class="src-sym">,</span> <span class="src-num">1000000</span><span class="src-sym">)</span>;<br />13 <span class="src-var">$value</span> = <span class="src-var">$json</span><span class="src-sym">-&gt;</span><a href="../Services_JSON/Services_JSON.html#methoddecode">decode</a><span class="src-sym">(</span><span class="src-var">$input</span><span class="src-sym">)</span>;</pre></code></pre></p></p>
<p class="notes">
Located in <a class="field" href="_JSON_php.html">/JSON.php</a> (line <span class="field">115</span>)
</p>
<pre></pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON</span>
<a href="#Services_JSON" title="details" class="method-name">Services_JSON</a>
(<span class="var-type">int</span>&nbsp;<span class="var-name">$use</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#decode" title="details" class="method-name">decode</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$str</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#encode" title="details" class="method-name">encode</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$var</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#isError" title="details" class="method-name">isError</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$code</span> = <span class="var-default">null</span>])
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON" id="Services_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON</span> (line <span class="line-number">133</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">constructs a new JSON instance</p>
<div class="method-signature">
<span class="method-result">Services_JSON</span>
<span class="method-name">
Services_JSON
</span>
(<span class="var-type">int</span>&nbsp;<span class="var-name">$use</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">int</span>
<span class="var-name">$use</span><span class="var-description">: <p>object behavior flags; combine with boolean-OR</p><p>possible values: <ul><li>SERVICES_JSON_LOOSE_TYPE: loose typing.
&quot;{...}&quot; syntax creates associative arrays
instead of objects in decode().</li><li>SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
Values which can't be encoded (e.g. resources)
appear as NULL instead of throwing errors.
By default, a deeply-nested resource will
bubble up with an error, so all return values
from encode() should be checked with isError()</li></ul></p></span> </li>
</ul>
</div>
<a name="methoddecode" id="decode"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">decode</span> (line <span class="line-number">484</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">decodes a JSON string into appropriate variable</p>
<ul class="tags">
<li><span class="field">return:</span> number, boolean, string, array, or object corresponding to given JSON input string. See argument 1 to Services_JSON() above for object-output behavior. Note that decode() always returns strings in ASCII or UTF-8 format!</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
decode
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$str</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$str</span><span class="var-description">: JSON-formatted string</span> </li>
</ul>
</div>
<a name="methodencode" id="encode"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">encode</span> (line <span class="line-number">237</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">encodes an arbitrary variable into JSON format</p>
<ul class="tags">
<li><span class="field">return:</span> JSON string representation of input var or an error if a problem occurs</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
encode
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$var</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$var</span><span class="var-description">: any number, boolean, string, array, or object to be encoded. see argument 1 to Services_JSON() above for array-parsing behavior. if var is a strng, note that encode() always expects it to be in ASCII or UTF-8 format!</span> </li>
</ul>
</div>
<a name="methodisError" id="isError"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">isError</span> (line <span class="line-number">766</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">todo:</span> Ultimately, this should just call PEAR::isError()</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
isError
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$code</span> = <span class="var-default">null</span>])
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:25 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_AssocArray_TestCase.html
0,0 → 1,200
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_AssocArray_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_AssocArray_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">157</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_AssocArray_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_AssocArray_TestCase</span>
<a href="#Services_JSON_AssocArray_TestCase" title="details" class="method-name">Services_JSON_AssocArray_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_JSON" title="details" class="method-name">test_to_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_then_from_JSON" title="details" class="method-name">test_to_then_from_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_type" title="details" class="method-name">test_type</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_AssocArray_TestCase" id="Services_JSON_AssocArray_TestCase"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_AssocArray_TestCase</span> (line <span class="line-number">159</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_AssocArray_TestCase</span>
<span class="method-name">
Services_JSON_AssocArray_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">163</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_to_JSON" id="test_to_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_to_JSON</span> (line <span class="line-number">187</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_JSON
</span>
()
</div>
</div>
<a name="methodtest_to_then_from_JSON" id="test_to_then_from_JSON"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_to_then_from_JSON</span> (line <span class="line-number">200</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_then_from_JSON
</span>
()
</div>
</div>
<a name="methodtest_type" id="test_type"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_type</span> (line <span class="line-number">181</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_type
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_Empties_TestCase.html
0,0 → 1,148
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_Empties_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_Empties_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">364</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_Empties_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_Empties_TestCase</span>
<a href="#Services_JSON_Empties_TestCase" title="details" class="method-name">Services_JSON_Empties_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_type" title="details" class="method-name">test_type</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_Empties_TestCase" id="Services_JSON_Empties_TestCase"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_Empties_TestCase</span> (line <span class="line-number">366</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_Empties_TestCase</span>
<span class="method-name">
Services_JSON_Empties_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">370</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_type" id="test_type"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_type</span> (line <span class="line-number">384</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_type
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_EncDec_TestCase.html
0,0 → 1,226
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_EncDec_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_EncDec_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">25</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_EncDec_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_EncDec_TestCase</span>
<a href="#Services_JSON_EncDec_TestCase" title="details" class="method-name">Services_JSON_EncDec_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_from_JSON" title="details" class="method-name">test_from_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_from_then_to_JSON" title="details" class="method-name">test_from_then_to_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_JSON" title="details" class="method-name">test_to_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_then_from_JSON" title="details" class="method-name">test_to_then_from_JSON</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_EncDec_TestCase" id="Services_JSON_EncDec_TestCase"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_EncDec_TestCase</span> (line <span class="line-number">27</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_EncDec_TestCase</span>
<span class="method-name">
Services_JSON_EncDec_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">31</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_from_JSON" id="test_from_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_from_JSON</span> (line <span class="line-number">88</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_from_JSON
</span>
()
</div>
</div>
<a name="methodtest_from_then_to_JSON" id="test_from_then_to_JSON"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_from_then_to_JSON</span> (line <span class="line-number">135</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_from_then_to_JSON
</span>
()
</div>
</div>
<a name="methodtest_to_JSON" id="test_to_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_to_JSON</span> (line <span class="line-number">68</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_JSON
</span>
()
</div>
</div>
<a name="methodtest_to_then_from_JSON" id="test_to_then_from_JSON"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_to_then_from_JSON</span> (line <span class="line-number">115</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_then_from_JSON
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_Error.html
0,0 → 1,96
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_Error</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_Error</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_JSON_php.html">/JSON.php</a> (line <span class="field">781</span>)
</p>
<pre>PEAR_Error
|
--Services_JSON_Error</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_Error</span>
<a href="#Services_JSON_Error" title="details" class="method-name">Services_JSON_Error</a>
([<span class="var-type">mixed</span>&nbsp;<span class="var-name">$message</span> = <span class="var-default">'unknown error'</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$code</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$userinfo</span> = <span class="var-default">null</span>])
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_Error" id="Services_JSON_Error"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_Error</span> (line <span class="line-number">783</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_Error</span>
<span class="method-name">
Services_JSON_Error
</span>
([<span class="var-type">mixed</span>&nbsp;<span class="var-name">$message</span> = <span class="var-default">'unknown error'</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$code</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$userinfo</span> = <span class="var-default">null</span>])
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_ErrorSuppression_TestCase.html
0,0 → 1,174
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_ErrorSuppression_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_ErrorSuppression_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">434</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_ErrorSuppression_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_ErrorSuppression_TestCase</span>
<a href="#Services_JSON_ErrorSuppression_TestCase" title="details" class="method-name">Services_JSON_ErrorSuppression_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_JSON" title="details" class="method-name">test_to_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_JSON_suppressed" title="details" class="method-name">test_to_JSON_suppressed</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_ErrorSuppression_TestCase" id="Services_JSON_ErrorSuppression_TestCase"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_ErrorSuppression_TestCase</span> (line <span class="line-number">436</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_ErrorSuppression_TestCase</span>
<span class="method-name">
Services_JSON_ErrorSuppression_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">440</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_to_JSON" id="test_to_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_to_JSON</span> (line <span class="line-number">462</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_JSON
</span>
()
</div>
</div>
<a name="methodtest_to_JSON_suppressed" id="test_to_JSON_suppressed"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_to_JSON_suppressed</span> (line <span class="line-number">469</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_JSON_suppressed
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_NestedArray_TestCase.html
0,0 → 1,200
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_NestedArray_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_NestedArray_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">212</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_NestedArray_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_NestedArray_TestCase</span>
<a href="#Services_JSON_NestedArray_TestCase" title="details" class="method-name">Services_JSON_NestedArray_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_from_JSON" title="details" class="method-name">test_from_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_type" title="details" class="method-name">test_type</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#_test_from_JSON" title="details" class="method-name">_test_from_JSON</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_NestedArray_TestCase" id="Services_JSON_NestedArray_TestCase"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_NestedArray_TestCase</span> (line <span class="line-number">214</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_NestedArray_TestCase</span>
<span class="method-name">
Services_JSON_NestedArray_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">218</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_from_JSON" id="test_from_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_from_JSON</span> (line <span class="line-number">272</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_from_JSON
</span>
()
</div>
</div>
<a name="methodtest_type" id="test_type"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_type</span> (line <span class="line-number">265</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_type
</span>
()
</div>
</div>
<a name="method_test_from_JSON" id="_test_from_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">_test_from_JSON</span> (line <span class="line-number">281</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
_test_from_JSON
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_Object_TestCase.html
0,0 → 1,200
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_Object_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_Object_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">289</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_Object_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_Object_TestCase</span>
<a href="#Services_JSON_Object_TestCase" title="details" class="method-name">Services_JSON_Object_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_from_then_to_JSON" title="details" class="method-name">test_from_then_to_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_to_JSON" title="details" class="method-name">test_to_JSON</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_type" title="details" class="method-name">test_type</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_Object_TestCase" id="Services_JSON_Object_TestCase"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_Object_TestCase</span> (line <span class="line-number">291</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_Object_TestCase</span>
<span class="method-name">
Services_JSON_Object_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">295</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_from_then_to_JSON" id="test_from_then_to_JSON"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_from_then_to_JSON</span> (line <span class="line-number">321</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_from_then_to_JSON
</span>
()
</div>
</div>
<a name="methodtest_to_JSON" id="test_to_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_to_JSON</span> (line <span class="line-number">315</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_to_JSON
</span>
()
</div>
</div>
<a name="methodtest_type" id="test_type"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_type</span> (line <span class="line-number">309</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_type
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_Spaces_Comments_TestCase.html
0,0 → 1,174
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_Spaces_Comments_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_Spaces_Comments_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">328</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_Spaces_Comments_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_Spaces_Comments_TestCase</span>
<a href="#Services_JSON_Spaces_Comments_TestCase" title="details" class="method-name">Services_JSON_Spaces_Comments_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_comments" title="details" class="method-name">test_comments</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_spaces" title="details" class="method-name">test_spaces</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_Spaces_Comments_TestCase" id="Services_JSON_Spaces_Comments_TestCase"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_Spaces_Comments_TestCase</span> (line <span class="line-number">330</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_Spaces_Comments_TestCase</span>
<span class="method-name">
Services_JSON_Spaces_Comments_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">334</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_comments" id="test_comments"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_comments</span> (line <span class="line-number">355</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_comments
</span>
()
</div>
</div>
<a name="methodtest_spaces" id="test_spaces"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">test_spaces</span> (line <span class="line-number">350</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_spaces
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/Services_JSON_UnquotedKeys_TestCase.html
0,0 → 1,148
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class Services_JSON_UnquotedKeys_TestCase</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class Services_JSON_UnquotedKeys_TestCase</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="notes">
Located in <a class="field" href="_Test-JSON_php.html">/Test-JSON.php</a> (line <span class="field">406</span>)
</p>
<pre>PHPUnit_TestCase
|
--Services_JSON_UnquotedKeys_TestCase</pre>
</div>
</div>
 
 
 
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">Services_JSON_UnquotedKeys_TestCase</span>
<a href="#Services_JSON_UnquotedKeys_TestCase" title="details" class="method-name">Services_JSON_UnquotedKeys_TestCase</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setUp" title="details" class="method-name">setUp</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#test_from_JSON" title="details" class="method-name">test_from_JSON</a>
()
</div>
</div>
</div>
</div>
 
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodServices_JSON_UnquotedKeys_TestCase" id="Services_JSON_UnquotedKeys_TestCase"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor Services_JSON_UnquotedKeys_TestCase</span> (line <span class="line-number">408</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">Services_JSON_UnquotedKeys_TestCase</span>
<span class="method-name">
Services_JSON_UnquotedKeys_TestCase
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
</div>
</div>
<a name="methodsetUp" id="setUp"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setUp</span> (line <span class="line-number">412</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setUp
</span>
()
</div>
</div>
<a name="methodtest_from_JSON" id="test_from_JSON"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">test_from_JSON</span> (line <span class="line-number">424</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
test_from_JSON
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:27 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/_JSON_php.html
0,0 → 1,197
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page JSON.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/JSON.php</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-constants">Constants</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts to and from JSON format.</p>
<p class="description"><p>JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. This feature can also be found in Python. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, TCL, and many others. These properties make JSON an ideal data-interchange language.</p><p>This package provides a simple encoder and decoder for JSON notation. It is intended for use with client-side Javascript applications that make use of HTTPRequest to perform server communication functions - data can be encoded into JSON notation for use in a client-side javascript, or decoded from incoming Javascript requests. JSON format is native to Javascript, and can be directly eval()'ed with no further parsing overhead</p><p>All strings should be in ASCII or UTF-8 format!</p><p>LICENSE: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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.</p><p>THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS 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 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.</p></p>
<ul class="tags">
<li><span class="field">license:</span> <a href="http://www.opensource.org/licenses/bsd-license.php">http://www.opensource.org/licenses/bsd-license.php</a></li>
<li><span class="field">link:</span> <a href="http://pear.php.net/pepr/pepr-proposal-show.php?id=198">http://pear.php.net/pepr/pepr-proposal-show.php?id=198</a></li>
<li><span class="field">version:</span> CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $</li>
<li><span class="field">copyright:</span> 2005 Michal Migurski</li>
<li><span class="field">author:</span> Matt Knapp &lt;<a href="mailto:mdknapp[at]gmail[dot]com">mailto:mdknapp[at]gmail[dot]com</a>&gt;</li>
<li><span class="field">author:</span> Brett Stimmerman &lt;<a href="mailto:brettstimmerman[at]gmail[dot]com">mailto:brettstimmerman[at]gmail[dot]com</a>&gt;</li>
<li><span class="field">author:</span> Michal Migurski &lt;<a href="mailto:mike-json@teczno.com">mailto:mike-json@teczno.com</a>&gt;</li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-constants">Constants</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON.html">Services_JSON</a>
</td>
<td>
Converts to and from JSON format.
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_Error.html">Services_JSON_Error</a>
</td>
<td>
</td>
</tr>
</table>
</div>
</div>
 
<a name="sec-constants"></a>
<div class="info-box">
<div class="info-box-title">Constants</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Constants</span>
</div>
<div class="info-box-body">
<a name="defineSERVICES_JSON_IN_ARR"><!-- --></a>
<div class="oddrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_IN_ARR</span> = 3
(line <span class="line-number">72</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Marker constant for Services_JSON::decode(), used to flag stack state</p>
</div>
<a name="defineSERVICES_JSON_IN_CMT"><!-- --></a>
<div class="evenrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_IN_CMT</span> = 5
(line <span class="line-number">82</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Marker constant for Services_JSON::decode(), used to flag stack state</p>
</div>
<a name="defineSERVICES_JSON_IN_OBJ"><!-- --></a>
<div class="oddrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_IN_OBJ</span> = 4
(line <span class="line-number">77</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Marker constant for Services_JSON::decode(), used to flag stack state</p>
</div>
<a name="defineSERVICES_JSON_IN_STR"><!-- --></a>
<div class="evenrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_IN_STR</span> = 2
(line <span class="line-number">67</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Marker constant for Services_JSON::decode(), used to flag stack state</p>
</div>
<a name="defineSERVICES_JSON_LOOSE_TYPE"><!-- --></a>
<div class="oddrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_LOOSE_TYPE</span> = 16
(line <span class="line-number">87</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Behavior switch for Services_JSON::decode()</p>
</div>
<a name="defineSERVICES_JSON_SLICE"><!-- --></a>
<div class="evenrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_SLICE</span> = 1
(line <span class="line-number">62</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Marker constant for Services_JSON::decode(), used to flag stack state</p>
</div>
<a name="defineSERVICES_JSON_SUPPRESS_ERRORS"><!-- --></a>
<div class="oddrow">
<div>
<span class="const-title">
<span class="const-name">SERVICES_JSON_SUPPRESS_ERRORS</span> = 32
(line <span class="line-number">92</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Behavior switch for Services_JSON::decode()</p>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:25 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/Services_JSON/_Test-JSON_php.html
0,0 → 1,168
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Test-JSON.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Test-JSON.php</h2>
 
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Unit tests for Services_JSON.</p>
<ul class="tags">
<li><span class="field">version:</span> CVS: $Id: Test-JSON.php,v 1.28 2006/06/28 05:54:17 migurski Exp $</li>
<li><span class="field">license:</span> <a href="http://www.opensource.org/licenses/bsd-license.php">http://www.opensource.org/licenses/bsd-license.php</a></li>
<li><span class="field">link:</span> <a href="http://pear.php.net/pepr/pepr-proposal-show.php?id=198">http://pear.php.net/pepr/pepr-proposal-show.php?id=198</a></li>
<li><span class="field">copyright:</span> 2005 Michal Migurski</li>
<li><span class="field">author:</span> Brett Stimmerman &lt;<a href="mailto:brettstimmerman[at]gmail[dot]com">mailto:brettstimmerman[at]gmail[dot]com</a>&gt;</li>
<li><span class="field">author:</span> Michal Migurski &lt;<a href="mailto:mike-json@teczno.com">mailto:mike-json@teczno.com</a>&gt;</li>
<li><span class="field">author:</span> Matt Knapp &lt;<a href="mailto:mdknapp[at]gmail[dot]com">mailto:mdknapp[at]gmail[dot]com</a>&gt;</li>
<li><span class="field">see:</span> <a href="../Services_JSON/_JSON_php.html">JSON.php</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_EncDec_TestCase.html">Services_JSON_EncDec_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_AssocArray_TestCase.html">Services_JSON_AssocArray_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_NestedArray_TestCase.html">Services_JSON_NestedArray_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_Object_TestCase.html">Services_JSON_Object_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_Spaces_Comments_TestCase.html">Services_JSON_Spaces_Comments_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_Empties_TestCase.html">Services_JSON_Empties_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_UnquotedKeys_TestCase.html">Services_JSON_UnquotedKeys_TestCase</a>
</td>
<td>
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../Services_JSON/Services_JSON_ErrorSuppression_TestCase.html">Services_JSON_ErrorSuppression_TestCase</a>
</td>
<td>
</td>
</tr>
</table>
</div>
</div>
 
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_PHPUnit_php"><!-- --></a>
<div class="oddrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'PHPUnit.php'</span>)
(line <span class="line-number">22</span>)
</span>
</div>
 
<!-- ========== Info from phpDoc block ========= -->
</div>
<a name="_JSON_php"><!-- --></a>
<div class="evenrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name"><a href="../Services_JSON/_JSON_php.html">'JSON.php'</a></span>)
(line <span class="line-number">23</span>)
</span>
</div>
 
<!-- ========== Info from phpDoc block ========= -->
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:26 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/blank.html
0,0 → 1,13
<html>
<head>
<title>Generated Documentation</title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div align="center"><h1>Generated Documentation</h1></div>
<b>Welcome to default!</b><br />
<br />
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.2.3</a><br />
</body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/classtrees_Services_JSON.html
0,0 → 1,60
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<!-- Start of Class Data -->
<H2>
</H2>
<h2>Root class Services_JSON</h2>
<ul>
<li><a href="Services_JSON/Services_JSON.html">Services_JSON</a></li></ul>
 
<h2>Root class Services_JSON_AssocArray_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html">Services_JSON_AssocArray_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_Empties_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_Empties_TestCase.html">Services_JSON_Empties_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_EncDec_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_EncDec_TestCase.html">Services_JSON_EncDec_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_Error</h2>
<ul>
<li>PEAR_Error<ul><li><a href="Services_JSON/Services_JSON_Error.html">Services_JSON_Error</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_ErrorSuppression_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html">Services_JSON_ErrorSuppression_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_NestedArray_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html">Services_JSON_NestedArray_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_Object_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_Object_TestCase.html">Services_JSON_Object_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_Spaces_Comments_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html">Services_JSON_Spaces_Comments_TestCase</a></li></ul></li></ul>
 
<h2>Root class Services_JSON_UnquotedKeys_TestCase</h2>
<ul>
<li>PHPUnit_TestCase<ul><li><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html">Services_JSON_UnquotedKeys_TestCase</a></li></ul></li></ul>
 
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:25 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/elementindex.html
0,0 → 1,457
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<a name="top"></a>
<h2>Full index</h2>
<h3>Package indexes</h3>
<ul>
<li><a href="elementindex_Services_JSON.html">Services_JSON</a></li>
</ul>
<br />
<div class="index-letter-menu">
<a class="index-letter" href="elementindex.html#d">d</a>
<a class="index-letter" href="elementindex.html#e">e</a>
<a class="index-letter" href="elementindex.html#i">i</a>
<a class="index-letter" href="elementindex.html#"></a>
<a class="index-letter" href="elementindex.html#s">s</a>
<a class="index-letter" href="elementindex.html#t">t</a>
</div>
 
<a name="d"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">d</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">decode</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methoddecode">Services_JSON::decode()</a> in JSON.php</div>
<div class="index-item-description">decodes a JSON string into appropriate variable</div>
</dd>
</dl>
<a name="e"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">e</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">encode</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methodencode">Services_JSON::encode()</a> in JSON.php</div>
<div class="index-item-description">encodes an arbitrary variable into JSON format</div>
</dd>
</dl>
<a name="i"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">i</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">isError</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methodisError">Services_JSON::isError()</a> in JSON.php</div>
</dd>
</dl>
<a name="j"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">j</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="include-title">JSON.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html">JSON.php</a> in JSON.php</div>
</dd>
</dl>
<a name="s"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">s</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
Services_JSON
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html">Services_JSON</a> in JSON.php</div>
<div class="index-item-description">Converts to and from JSON format.</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methodServices_JSON">Services_JSON::Services_JSON()</a> in JSON.php</div>
<div class="index-item-description">constructs a new JSON instance</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_AssocArray_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodServices_JSON_AssocArray_TestCase">Services_JSON_AssocArray_TestCase::Services_JSON_AssocArray_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_AssocArray_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html">Services_JSON_AssocArray_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_Empties_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html">Services_JSON_Empties_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Empties_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html#methodServices_JSON_Empties_TestCase">Services_JSON_Empties_TestCase::Services_JSON_Empties_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_EncDec_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodServices_JSON_EncDec_TestCase">Services_JSON_EncDec_TestCase::Services_JSON_EncDec_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_EncDec_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html">Services_JSON_EncDec_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Error</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Error.html#methodServices_JSON_Error">Services_JSON_Error::Services_JSON_Error()</a> in JSON.php</div>
</dd>
<dt class="field">
Services_JSON_Error
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Error.html">Services_JSON_Error</a> in JSON.php</div>
</dd>
<dt class="field">
Services_JSON_ErrorSuppression_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html">Services_JSON_ErrorSuppression_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_ErrorSuppression_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodServices_JSON_ErrorSuppression_TestCase">Services_JSON_ErrorSuppression_TestCase::Services_JSON_ErrorSuppression_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_ARR</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_ARR">SERVICES_JSON_IN_ARR</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_CMT</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_CMT">SERVICES_JSON_IN_CMT</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_OBJ</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_OBJ">SERVICES_JSON_IN_OBJ</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_STR</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_STR">SERVICES_JSON_IN_STR</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_LOOSE_TYPE</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_LOOSE_TYPE">SERVICES_JSON_LOOSE_TYPE</a> in JSON.php</div>
<div class="index-item-description">Behavior switch for Services_JSON::decode()</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_NestedArray_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodServices_JSON_NestedArray_TestCase">Services_JSON_NestedArray_TestCase::Services_JSON_NestedArray_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_NestedArray_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html">Services_JSON_NestedArray_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Object_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodServices_JSON_Object_TestCase">Services_JSON_Object_TestCase::Services_JSON_Object_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_Object_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html">Services_JSON_Object_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_SLICE</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_SLICE">SERVICES_JSON_SLICE</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
Services_JSON_Spaces_Comments_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html">Services_JSON_Spaces_Comments_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Spaces_Comments_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodServices_JSON_Spaces_Comments_TestCase">Services_JSON_Spaces_Comments_TestCase::Services_JSON_Spaces_Comments_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_SUPPRESS_ERRORS</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_SUPPRESS_ERRORS">SERVICES_JSON_SUPPRESS_ERRORS</a> in JSON.php</div>
<div class="index-item-description">Behavior switch for Services_JSON::decode()</div>
</dd>
<dt class="field">
Services_JSON_UnquotedKeys_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html">Services_JSON_UnquotedKeys_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_UnquotedKeys_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html#methodServices_JSON_UnquotedKeys_TestCase">Services_JSON_UnquotedKeys_TestCase::Services_JSON_UnquotedKeys_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html#methodsetUp">Services_JSON_UnquotedKeys_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodsetUp">Services_JSON_Spaces_Comments_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodsetUp">Services_JSON_Object_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html#methodsetUp">Services_JSON_Empties_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodsetUp">Services_JSON_AssocArray_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodsetUp">Services_JSON_NestedArray_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodsetUp">Services_JSON_EncDec_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodsetUp">Services_JSON_ErrorSuppression_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
</dl>
<a name="t"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">t</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="include-title">Test-JSON.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_Test-JSON_php.html">Test-JSON.php</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_comments</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodtest_comments">Services_JSON_Spaces_Comments_TestCase::test_comments()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_from_JSON">Services_JSON_EncDec_TestCase::test_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html#methodtest_from_JSON">Services_JSON_UnquotedKeys_TestCase::test_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodtest_from_JSON">Services_JSON_NestedArray_TestCase::test_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_then_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodtest_from_then_to_JSON">Services_JSON_Object_TestCase::test_from_then_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_then_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_from_then_to_JSON">Services_JSON_EncDec_TestCase::test_from_then_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_spaces</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodtest_spaces">Services_JSON_Spaces_Comments_TestCase::test_spaces()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodtest_to_JSON">Services_JSON_Object_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodtest_to_JSON">Services_JSON_ErrorSuppression_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_to_JSON">Services_JSON_EncDec_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodtest_to_JSON">Services_JSON_AssocArray_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON_suppressed</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodtest_to_JSON_suppressed">Services_JSON_ErrorSuppression_TestCase::test_to_JSON_suppressed()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_then_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodtest_to_then_from_JSON">Services_JSON_AssocArray_TestCase::test_to_then_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_then_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_to_then_from_JSON">Services_JSON_EncDec_TestCase::test_to_then_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodtest_type">Services_JSON_AssocArray_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html#methodtest_type">Services_JSON_Empties_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodtest_type">Services_JSON_NestedArray_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodtest_type">Services_JSON_Object_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
</dl>
<a name="_"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">_</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">_test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#method_test_from_JSON">Services_JSON_NestedArray_TestCase::_test_from_JSON()</a> in Test-JSON.php</div>
</dd>
</dl>
 
<div class="index-letter-menu">
<a class="index-letter" href="elementindex.html#d">d</a>
<a class="index-letter" href="elementindex.html#e">e</a>
<a class="index-letter" href="elementindex.html#i">i</a>
<a class="index-letter" href="elementindex.html#"></a>
<a class="index-letter" href="elementindex.html#s">s</a>
<a class="index-letter" href="elementindex.html#t">t</a>
</div> </body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/elementindex_Services_JSON.html
0,0 → 1,456
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<a name="top"></a>
<h2>[Services_JSON] element index</h2>
<a href="elementindex.html">All elements</a>
<br />
<div class="index-letter-menu">
<a class="index-letter" href="elementindex_Services_JSON.html#d">d</a>
<a class="index-letter" href="elementindex_Services_JSON.html#e">e</a>
<a class="index-letter" href="elementindex_Services_JSON.html#i">i</a>
<a class="index-letter" href="elementindex_Services_JSON.html#j">j</a>
<a class="index-letter" href="elementindex_Services_JSON.html#s">s</a>
<a class="index-letter" href="elementindex_Services_JSON.html#t">t</a>
<a class="index-letter" href="elementindex_Services_JSON.html#_">_</a>
</div>
 
<a name="_"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">_</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">_test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#method_test_from_JSON">Services_JSON_NestedArray_TestCase::_test_from_JSON()</a> in Test-JSON.php</div>
</dd>
</dl>
<a name="d"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">d</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">decode</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methoddecode">Services_JSON::decode()</a> in JSON.php</div>
<div class="index-item-description">decodes a JSON string into appropriate variable</div>
</dd>
</dl>
<a name="e"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">e</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">encode</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methodencode">Services_JSON::encode()</a> in JSON.php</div>
<div class="index-item-description">encodes an arbitrary variable into JSON format</div>
</dd>
</dl>
<a name="i"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">i</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">isError</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methodisError">Services_JSON::isError()</a> in JSON.php</div>
</dd>
</dl>
<a name="j"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">j</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="include-title">JSON.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html">JSON.php</a> in JSON.php</div>
</dd>
</dl>
<a name="s"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">s</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
Services_JSON
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html">Services_JSON</a> in JSON.php</div>
<div class="index-item-description">Converts to and from JSON format.</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON.html#methodServices_JSON">Services_JSON::Services_JSON()</a> in JSON.php</div>
<div class="index-item-description">constructs a new JSON instance</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_AssocArray_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodServices_JSON_AssocArray_TestCase">Services_JSON_AssocArray_TestCase::Services_JSON_AssocArray_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_AssocArray_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html">Services_JSON_AssocArray_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_Empties_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html">Services_JSON_Empties_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Empties_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html#methodServices_JSON_Empties_TestCase">Services_JSON_Empties_TestCase::Services_JSON_Empties_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_EncDec_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodServices_JSON_EncDec_TestCase">Services_JSON_EncDec_TestCase::Services_JSON_EncDec_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_EncDec_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html">Services_JSON_EncDec_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Error</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Error.html#methodServices_JSON_Error">Services_JSON_Error::Services_JSON_Error()</a> in JSON.php</div>
</dd>
<dt class="field">
Services_JSON_Error
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Error.html">Services_JSON_Error</a> in JSON.php</div>
</dd>
<dt class="field">
Services_JSON_ErrorSuppression_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html">Services_JSON_ErrorSuppression_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_ErrorSuppression_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodServices_JSON_ErrorSuppression_TestCase">Services_JSON_ErrorSuppression_TestCase::Services_JSON_ErrorSuppression_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_ARR</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_ARR">SERVICES_JSON_IN_ARR</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_CMT</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_CMT">SERVICES_JSON_IN_CMT</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_OBJ</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_OBJ">SERVICES_JSON_IN_OBJ</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_IN_STR</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_IN_STR">SERVICES_JSON_IN_STR</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_LOOSE_TYPE</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_LOOSE_TYPE">SERVICES_JSON_LOOSE_TYPE</a> in JSON.php</div>
<div class="index-item-description">Behavior switch for Services_JSON::decode()</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_NestedArray_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodServices_JSON_NestedArray_TestCase">Services_JSON_NestedArray_TestCase::Services_JSON_NestedArray_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_NestedArray_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html">Services_JSON_NestedArray_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Object_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodServices_JSON_Object_TestCase">Services_JSON_Object_TestCase::Services_JSON_Object_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
Services_JSON_Object_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html">Services_JSON_Object_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_SLICE</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_SLICE">SERVICES_JSON_SLICE</a> in JSON.php</div>
<div class="index-item-description">Marker constant for Services_JSON::decode(), used to flag stack state</div>
</dd>
<dt class="field">
Services_JSON_Spaces_Comments_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html">Services_JSON_Spaces_Comments_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_Spaces_Comments_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodServices_JSON_Spaces_Comments_TestCase">Services_JSON_Spaces_Comments_TestCase::Services_JSON_Spaces_Comments_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="const-title">SERVICES_JSON_SUPPRESS_ERRORS</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_JSON_php.html#defineSERVICES_JSON_SUPPRESS_ERRORS">SERVICES_JSON_SUPPRESS_ERRORS</a> in JSON.php</div>
<div class="index-item-description">Behavior switch for Services_JSON::decode()</div>
</dd>
<dt class="field">
Services_JSON_UnquotedKeys_TestCase
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html">Services_JSON_UnquotedKeys_TestCase</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">Services_JSON_UnquotedKeys_TestCase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html#methodServices_JSON_UnquotedKeys_TestCase">Services_JSON_UnquotedKeys_TestCase::Services_JSON_UnquotedKeys_TestCase()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html#methodsetUp">Services_JSON_UnquotedKeys_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodsetUp">Services_JSON_Spaces_Comments_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodsetUp">Services_JSON_Object_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html#methodsetUp">Services_JSON_Empties_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodsetUp">Services_JSON_AssocArray_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodsetUp">Services_JSON_NestedArray_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodsetUp">Services_JSON_EncDec_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">setUp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodsetUp">Services_JSON_ErrorSuppression_TestCase::setUp()</a> in Test-JSON.php</div>
</dd>
</dl>
<a name="t"></a>
<div class="index-letter-section">
<div style="float: left" class="index-letter-title">t</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="include-title">Test-JSON.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/_Test-JSON_php.html">Test-JSON.php</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_comments</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodtest_comments">Services_JSON_Spaces_Comments_TestCase::test_comments()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_from_JSON">Services_JSON_EncDec_TestCase::test_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_UnquotedKeys_TestCase.html#methodtest_from_JSON">Services_JSON_UnquotedKeys_TestCase::test_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodtest_from_JSON">Services_JSON_NestedArray_TestCase::test_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_then_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodtest_from_then_to_JSON">Services_JSON_Object_TestCase::test_from_then_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_from_then_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_from_then_to_JSON">Services_JSON_EncDec_TestCase::test_from_then_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_spaces</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Spaces_Comments_TestCase.html#methodtest_spaces">Services_JSON_Spaces_Comments_TestCase::test_spaces()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodtest_to_JSON">Services_JSON_Object_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodtest_to_JSON">Services_JSON_ErrorSuppression_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_to_JSON">Services_JSON_EncDec_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodtest_to_JSON">Services_JSON_AssocArray_TestCase::test_to_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_JSON_suppressed</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_ErrorSuppression_TestCase.html#methodtest_to_JSON_suppressed">Services_JSON_ErrorSuppression_TestCase::test_to_JSON_suppressed()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_then_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodtest_to_then_from_JSON">Services_JSON_AssocArray_TestCase::test_to_then_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_to_then_from_JSON</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_EncDec_TestCase.html#methodtest_to_then_from_JSON">Services_JSON_EncDec_TestCase::test_to_then_from_JSON()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_AssocArray_TestCase.html#methodtest_type">Services_JSON_AssocArray_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Empties_TestCase.html#methodtest_type">Services_JSON_Empties_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_NestedArray_TestCase.html#methodtest_type">Services_JSON_NestedArray_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
<dt class="field">
<span class="method-title">test_type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="Services_JSON/Services_JSON_Object_TestCase.html#methodtest_type">Services_JSON_Object_TestCase::test_type()</a> in Test-JSON.php</div>
</dd>
</dl>
 
<div class="index-letter-menu">
<a class="index-letter" href="elementindex_Services_JSON.html#d">d</a>
<a class="index-letter" href="elementindex_Services_JSON.html#e">e</a>
<a class="index-letter" href="elementindex_Services_JSON.html#i">i</a>
<a class="index-letter" href="elementindex_Services_JSON.html#j">j</a>
<a class="index-letter" href="elementindex_Services_JSON.html#s">s</a>
<a class="index-letter" href="elementindex_Services_JSON.html#t">t</a>
<a class="index-letter" href="elementindex_Services_JSON.html#_">_</a>
</div> </body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/errors.html
0,0 → 1,51
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>phpDocumentor Parser Errors and Warnings</title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<a href="#Post-parsing">Post-parsing</a><br>
<a href="#Test-JSON.php">Test-JSON.php</a><br>
<a name="Post-parsing"></a>
<h1>Post-parsing</h1>
<h2>Warnings:</h2><br>
<b>Warning</b> - Class Services_JSON_ErrorSuppression_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_Spaces_Comments_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_Empties_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_UnquotedKeys_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_Error parent PEAR_Error not found<br>
<b>Warning</b> - Class Services_JSON_AssocArray_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_EncDec_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_NestedArray_TestCase parent PHPUnit_TestCase not found<br>
<b>Warning</b> - Class Services_JSON_Object_TestCase parent PHPUnit_TestCase not found<br>
<a name="JSON.php"></a>
<h1>JSON.php</h1>
<h2>Warnings:</h2><br>
<b>Warning on line 115</b> - no @package tag was used in a DocBlock for class Services_JSON<br>
<b>Warning on line 781</b> - no @package tag was used in a DocBlock for class Services_JSON_Error<br>
<b>Warning on line 795</b> - no @package tag was used in a DocBlock for class Services_JSON_Error<br>
<b>Warning on line 795</b> -
duplicate class element "Services_JSON_Error" in file /Users/migurski/Sites/JSON-PHP/JSON.php will be ignored.
Use an @ignore tag on the original if you want this case to be documented.<br>
<a name="Test-JSON.php"></a>
<h1>Test-JSON.php</h1>
<h2>Warnings:</h2><br>
<b>Warning on line 19</b> - package default is already in category , will now replace with category <br>
<b>Warning on line 21</b> - Page-level DocBlock precedes "require_once Test-JSON.php", use another DocBlock to document the source element<br>
<b>Warning on line 24</b> - no @package tag was used in a DocBlock for class Services_JSON_EncDec_TestCase<br>
<b>Warning on line 156</b> - no @package tag was used in a DocBlock for class Services_JSON_AssocArray_TestCase<br>
<b>Warning on line 211</b> - no @package tag was used in a DocBlock for class Services_JSON_NestedArray_TestCase<br>
<b>Warning on line 288</b> - no @package tag was used in a DocBlock for class Services_JSON_Object_TestCase<br>
<b>Warning on line 327</b> - no @package tag was used in a DocBlock for class Services_JSON_Spaces_Comments_TestCase<br>
<b>Warning on line 363</b> - no @package tag was used in a DocBlock for class Services_JSON_Empties_TestCase<br>
<b>Warning on line 405</b> - no @package tag was used in a DocBlock for class Services_JSON_UnquotedKeys_TestCase<br>
<b>Warning on line 433</b> - no @package tag was used in a DocBlock for class Services_JSON_ErrorSuppression_TestCase<br>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:27 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/index.html
0,0 → 1,24
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Generated by phpDocumentor on Tue, 27 Jun 2006 22:54:25 -0700 -->
<title>Generated Documentation</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
 
<FRAMESET rows='100,*'>
<FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999">
<FRAMESET cols='25%,*'>
<FRAME src='li_Services_JSON.html' name='left_bottom' frameborder="1" bordercolor="#999999">
<FRAME src='blank.html' name='right' frameborder="1" bordercolor="#999999">
</FRAMESET>
<NOFRAMES>
<H2>Frame Alert</H2>
<P>This document is designed to be viewed using the frames feature.
If you see this message, you are using a non-frame-capable web client.</P>
</NOFRAMES>
</FRAMESET>
</HTML>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/li_Services_JSON.html
0,0 → 1,45
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="package-title">Services_JSON</div>
<div class="package-details">
 
<dl class="tree">
<dt class="folder-title">Description</dt>
<dd>
<a href='classtrees_Services_JSON.html' target='right'>Class trees</a><br />
<a href='elementindex_Services_JSON.html' target='right'>Index of elements</a><br />
<a href="todolist.html" target="right">Todo List</a><br />
</dd>
<dt class="folder-title">Classes</dt>
<dd><a href='Services_JSON/Services_JSON.html' target='right'>Services_JSON</a></dd>
<dd><a href='Services_JSON/Services_JSON_AssocArray_TestCase.html' target='right'>Services_JSON_AssocArray_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_Empties_TestCase.html' target='right'>Services_JSON_Empties_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_EncDec_TestCase.html' target='right'>Services_JSON_EncDec_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_Error.html' target='right'>Services_JSON_Error</a></dd>
<dd><a href='Services_JSON/Services_JSON_ErrorSuppression_TestCase.html' target='right'>Services_JSON_ErrorSuppression_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_NestedArray_TestCase.html' target='right'>Services_JSON_NestedArray_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_Object_TestCase.html' target='right'>Services_JSON_Object_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_Spaces_Comments_TestCase.html' target='right'>Services_JSON_Spaces_Comments_TestCase</a></dd>
<dd><a href='Services_JSON/Services_JSON_UnquotedKeys_TestCase.html' target='right'>Services_JSON_UnquotedKeys_TestCase</a></dd>
<dt class="folder-title">Files</dt>
<dd><a href='Services_JSON/_JSON_php.html' target='right'>JSON.php</a></dd>
<dd><a href='Services_JSON/_Test-JSON_php.html' target='right'>Test-JSON.php</a></dd>
</dl>
</div>
<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.2.3</span></a></p>
</BODY>
</HTML>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/media/banner.css
0,0 → 1,32
body
{
background-color: #CCCCFF;
margin: 0px;
padding: 0px;
}
 
/* Banner (top bar) classes */
 
.banner { }
 
.banner-menu
{
clear: both;
padding: .5em;
border-top: 2px solid #6666AA;
}
 
.banner-title
{
text-align: right;
font-size: 20pt;
font-weight: bold;
margin: .2em;
}
 
.package-selector
{
background-color: #AAAADD;
border: 1px solid black;
color: yellow;
}
Property changes:
Added: svn:mime-type
+text/css
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/media/stylesheet.css
0,0 → 1,134
a { color: #336699; text-decoration: none; }
a:hover { color: #6699CC; text-decoration: underline; }
a:active { color: #6699CC; text-decoration: underline; }
 
body { background : #FFFFFF; }
body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt }
p, li { line-height: 140% }
a img { border: 0px; }
dd { margin-left: 0px; padding-left: 1em; }
 
/* Page layout/boxes */
 
.info-box {}
.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF }
.info-box-body { border: 1px solid #999999; padding: .5em; }
.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; }
 
.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
 
.page-body { max-width: 800px; margin: auto; }
.tree dl { margin: 0px }
 
/* Index formatting classes */
 
.index-item-body { margin-top: .5em; margin-bottom: .5em}
.index-item-description { margin-top: .25em }
.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt }
.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em}
.index-letter-title { font-size: 12pt; font-weight: bold }
.index-letter-menu { text-align: center; margin: 1em }
.index-letter { font-size: 12pt }
 
/* Docbook classes */
 
.description {}
.short-description { font-weight: bold; color: #666666; }
.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; }
.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; }
.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; }
.package { }
.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black }
.package-details { font-size: 85%; }
.sub-package { font-weight: bold; font-size: 120% }
.tutorial { border-width: thin; border-color: #0066ff }
.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; }
.nav-button-disabled { color: #999999; }
.nav-button:active,
.nav-button:focus,
.nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none }
.folder-title { font-style: italic }
 
/* Generic formatting */
 
.field { font-weight: bold; }
.detail { font-size: 8pt; }
.notes { font-style: italic; font-size: 8pt; }
.separator { background-color: #999999; height: 2px; }
.warning { color: #FF6600; }
.disabled { font-style: italic; color: #999999; }
 
/* Code elements */
 
.line-number { }
 
.class-table { width: 100%; }
.class-table-header { border-bottom: 1px dotted #666666; text-align: left}
.class-name { color: #000000; font-weight: bold; }
 
.method-summary { padding-left: 1em; font-size: 8pt }
.method-header { }
.method-definition { margin-bottom: .3em }
.method-title { font-weight: bold; }
.method-name { font-weight: bold; }
.method-signature { font-size: 85%; color: #666666; margin: .5em 0em }
.method-result { font-style: italic; }
 
.var-summary { padding-left: 1em; font-size: 8pt; }
.var-header { }
.var-title { margin-bottom: .3em }
.var-type { font-style: italic; }
.var-name { font-weight: bold; }
.var-default {}
.var-description { font-weight: normal; color: #000000; }
 
.include-title { }
.include-type { font-style: italic; }
.include-name { font-weight: bold; }
 
.const-title { }
.const-name { font-weight: bold; }
 
/* Syntax highlighting */
 
.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; }
 
.src-comm { color: green; }
.src-id { }
.src-inc { color: #0000FF; }
.src-key { color: #0000FF; }
.src-num { color: #CC0000; }
.src-str { color: #66cccc; }
.src-sym { font-weight: bold; }
.src-var { }
 
.src-php { font-weight: bold; }
 
.src-doc { color: #009999 }
.src-doc-close-template { color: #0000FF }
.src-doc-coretag { color: #0099FF; font-weight: bold }
.src-doc-inlinetag { color: #0099FF }
.src-doc-internal { color: #6699cc }
.src-doc-tag { color: #0080CC }
.src-doc-template { color: #0000FF }
.src-doc-type { font-style: italic }
.src-doc-var { font-style: italic }
 
/* tutorial */
 
.authors { }
.author { font-style: italic; font-weight: bold }
.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em }
.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap }
.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
.ref-title-box { }
.ref-title { }
.ref-purpose { font-style: italic; color: #666666 }
.ref-synopsis { }
.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF }
.cmd-synopsis { margin: 1em 0em }
.cmd-title { font-weight: bold }
.toc { margin-left: 2em; padding-left: 0em }
 
Property changes:
Added: svn:mime-type
+text/css
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/packages.html
0,0 → 1,27
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<link rel="stylesheet" href="media/banner.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="banner">
<div class="banner-title">Services_JSON</div>
<div class="banner-menu">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
</td>
<td style="width: 2em">&nbsp;</td>
<td style="text-align: right">
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/JSON/doc/todolist.html
0,0 → 1,21
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Todo List</title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div align="center"><h1>Todo List</h1></div>
<h2>Services_JSON</h2>
<h3><a href="Services_JSON/Services_JSON.html#methodisError">Services_JSON::isError()</a></h3>
<ul>
<li>Ultimately, this should just call PEAR::isError()</li>
</ul>
<p class="notes" id="credit">
Documentation generated on Tue, 27 Jun 2006 22:54:27 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</body>
</html>
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/jsonwrapper/jsonwrapper.php
0,0 → 1,6
<?php
# In PHP 5.2 or higher we don't need to bring this in
if (!function_exists('json_encode')) {
require_once 'jsonwrapper_inner.php';
}
?>
/trunk/dependencies/jsonwrapper/jsonwrapper_inner.php
0,0 → 1,23
<?php
 
require_once 'JSON/JSON.php';
 
function json_encode($arg)
{
global $services_json;
if (!isset($services_json)) {
$services_json = new Services_JSON();
}
return $services_json->encode($arg);
}
 
function json_decode($arg)
{
global $services_json;
if (!isset($services_json)) {
$services_json = new Services_JSON();
}
return $services_json->decode($arg);
}
 
?>
/trunk/dependencies/sajax/Changes.txt
0,0 → 1,69
SAJAX CHANGELOG
---------------
 
Sajax version 0.13 (August 26, 2009)
 
* [php] Use php native json_encode for serilization of responce data.
* [php] use of JSON.parse on client side for better speed and security.
* [php] per function GET/POST
* [php] Autoselect POST if request is to large data for GET
* [php] Synchronous mode
* [php] gratly improved error handeling on both client and server side
* [php] Support for utf-8 and international charectors
* [php] Better handeling of IE (no more warnings in IE7+)
* [cf] Updated to match the PHP implementation.
 
Sajax version 0.12 (January 30, 2006)
 
* [php] Numerous improvements to serialization, support for varied PHP
setups, addition of sajax_cancel().
* [asp] Removed due to serious bugs
 
Sajax version 0.11 () Unreleased beta.
 
Sajax version 0.10 (March 21, 2005)
 
* [php] Support for POST instead of just GET. Set $sajax_request_type.
Based on code from Folletto Malefico, to whom I owe thanks.
POST mode should be used if you are sending long requests (more
than 512 bytes) or if you are modifying data with the request.
* [php] (untested) Support for GET/POST to pages other than $REQUEST_URI.
Set $sajax_remote_uri to the desired URL to get this behavior.
* [php] Small fixes to the Wall example, thanks to Leonardo Lorieri
and Jesse Sightler.
* [cf] Cold Fusion MX support (Thanks Eric Moritz)
* [asp] ASP support (Thanks Jared Nuzzolillo)
* [python] Improvements to the Python backend from Adam Collard
 
Sajax version 0.9 (March 15, 2005)
 
* [php] Major changes to the PHP backend:
* [php] Renamed incl_sajax.php to Sajax.php to fit PEAR and other language
naming conventions
* [php] Functions and vars previously named rs_* are now sajax_*
* [php] Function stubs all call one generalized sajax_do_call() dispatcher
* [php] Added non-echoing version of sajax_echo_javascript() called
sajax_get_javascript via the magic of output buffering
* [php] Changed all examples to support new framework
* [perl] Applied fix for URL encoding of space (Thanks Max Maischein)
* [ruby] Added Ruby backend contributed by anonymous author
* [io] Added Io (http://www.iolanguage.com/) backend by Sajax team @ MM
 
Sajax version 0.8 (March 9, 2005)
 
* [php] Bug in the long-open-tags changes. Thanks to Matthew M. Vince.
* [lua] Backend port added. Thanks to Javier Guerra.
 
Sajax version 0.7 (March 9, 2005)
 
* [php] Major bug calling remote functions without args.
 
Sajax version 0.6 (March 8, 2005)
 
* Layout of archive changed; base folder changed; subfolders added for backends
* [php] Used short open tags by default. Thanks to Matthew M. Vince.
* [perl] Backend port added. Thanks to Nathan Schmidt, Jason Purdy and Nate
Mueller.
* [python] Backend port added. Thanks to Adam Collard. Please note that
this port is licensed under the Creative Commons "By" License version
2.0.
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/Known issues.txt
0,0 → 1,13
iCab 3.0.5 will fail badly when using json_parse_state and receving large stings.
 
IE 5.01 will fail nicly when using json_parse.
 
Safari 1.2 will send malformed data when using json2.stringify and sending numberes as strings.
 
Prototype 1.5.1 and later, 1.6.0.3 is the latest at this point, breaks firefox's JSON.stringify(), a workaround for this is to use the methode provided by Prototype instead, to this, include the folowing code just after you load prototype.js
<script type="text/javascript"><!--
var JSON = JSON || {};
JSON.stringify = function(value) { return value.toJSON(); };
JSON.parse = JSON.parse || function(jsonsring) { return jsonsring.evalJSON(true); };
//-->
</script>
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/Old browsers.txt
0,0 → 1,10
Mozila 0.6 - 0.9.2 might be posible to geat to work but may requre major rewrite as it does not support x.readyState or x.onreadystatechange and probably othere parts of XMLHttpRequest, an alternative would be using iframe's. Also JSON.stringify() seams to fail for it.
 
 
IE 4 is also posible but it requres removing all try{} catch(e) {} from the code, only using 'Microsoft.XMLHTTP' for IE6, IE5.5, IE5 and IE4 and having less error handeling. and might break support for othere browsers and or functionality. In addition I think it would requre some special case of installed updates on the client end. If you do get it to work feel free to end us the code and we will include it in this file for the next version of Sajax.
 
 
iCab 3.0 - 3.0.4 are untested, please report your results.
 
 
Google Chrom is untested except for 2.0.172.39
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/Readme.txt
0,0 → 1,27
WELCOME TO SAJAX
----------------
 
Sajax is a cross-platform, cross-browser web scripting toolkit
that makes it easy to expose functions in your code to JavaScript.
 
For more information about Sajax, please see the homepage:
 
http://sajax.info/
 
In this archive you will find a folder for each platform that is
currently supported. Please see individual documentation in each
folder for specific errata.
 
 
 
As of 0.13 a JavaScript implementation of JSON.stringify() has
become a requirement when sending data for browsers that does not
have this nativly (IE8 or FF3.5). JSON2 from
http://www.json.org/js.html has been included for this reason.
 
It is highly recomented to also include a JSON.parse()
implementation for better security for the client, especialy when
handeling data from othere sites, json.parse.js is the
implementation from JSON2, unfortunatly this breaks Safari 1.3.2
json_parse_state.js seams to be the most compatible but
json_parse.js might also be worth checking out.
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/Todo.txt
0,0 → 1,24
SAJAX TO DO LIST
----------------
* Fix http://www.modernmethod.com/sajax/forum/viewtopic.php?p=308
* Make the whole darn thing an object
* Add J2EE module
* Apply Julien Grossiord's port non-80 patch.
* Apply Steve Smith (ND)'s ColdFusion POST patch.
* Better whitespace handling
* Test if a function exists before allowing you to export it
* Add Kae's IFRAME patch.
* Add C# support.
* Update othere backends to match php in 0.13.
 
THINGS THAT WERE TO DO AND ARE NOW TO DONE
------------------------------------------
* All-numeric array indices -> JS array, not object.
* Encode/serialize array elements
* Return false if the object could not be created.
* Support for "options" such as post-to-an-ID and POST/GET submit.
* Added sajax_set_remote_url or something along those lines instead of
$REQUEST_URI
* Support POST
* Add CFML, ASP.Net
* Fix Perl module (with the contributed code)
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/asp/Readme.txt
0,0 → 1,3
ASP support has been temporarily removed due to bugs. It will be back soon.
 
- tlack
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/asp/example_multiply.asp
0,0 → 1,77
<%@ Language=JScript %>
<!--#include file="sajax.asp"-->
 
<%
function multiply(x, y) {
return x * y;
}
function add(x, y, z) {
return x + y + z;
}
sajax = new Sajax();
// sajax.debug_mode = true;
sajax.export_function("multiply","add");
sajax.handle_client_request();
 
%>
<html>
<head>
<title>Multiplier</title>
<script>
<%
sajax.show_javascript();
%>
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
// get the folder name
var x, y;
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_multiply(x, y, do_multiply_cb);
}
function do_add_cb(z) {
document.getElementById("zza").value = z;
}
 
function do_add() {
// get the folder name
var x, y, z;
x = "'"+document.getElementById("xa").value+"'";
y = "'"+document.getElementById("ya").value+"'";
z = "'"+document.getElementById("za").value+"'";
x_add(x, y, z, do_add_cb);
}
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3">
*
<input type="text" name="y" id="y" value="3" size="3">
=
<input type="text" name="z" id="z" value="" size="3">
<input type="button" name="check" value="Calculate"
onclick="do_multiply(); return false;">
<br>
try adding some strings, eg:
<input type="text" name="xa" id="xa" value="ex " size="3">
+
<input type="text" name="ya" id="ya" value="nihil, " size="3">
+
<input type="text" name="za" id="za" value="nihil fit" size="3">
=
<input type="text" name="zza" id="zza" value="" size="15">
<input type="button" name="check" value="Calculate"
onclick="do_add(); return false;">
</body>
</html>
/trunk/dependencies/sajax/asp/sajax.asp
0,0 → 1,186
<%
 
function r(str)
{
Response.write("<br>-"+str+"-<br>")
}
 
function Sajax(debug_mode)
{
this.debug_mode = debug_mode||false;
this.export_list = [];
this.js_has_been_shown = false;
this.handle_client_request = function()
{
func_name = Request.QueryString("rs");
if(!func_name||String(func_name)=="undefined") return false
//bust cache
Response.AddHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT")
//always modified
Response.AddHeader("Last-Modified", new Date().toGMTString().replace(/UTC/,"GMT"))
//HTTP/1.1
Response.AddHeader("Cache-Control", "no-cache, must-revalidate")
//HTTP/1.0
Response.AddHeader("Pragma", "no-cache")
if(this.export_list[func_name]=="undefined")
{
result = "-"+func_name+" is not callable";
//if(this.debug_mode) Response.write("-"+func_name+" is not callable");
}
else
{
rsargs_raw = Request.QueryString("rsargs[]")
 
rsargs = []
for(rs_i=1;rs_i<=rsargs_raw.Count;rs_i++)
{
rsargs[rs_i-1]=rsargs_raw(rs_i)
}
 
// if(this.debug_mode) Response.write("calling " + func_name + "(" +
// rsargs.join(",")+")")
eval_str = this.export_list[func_name]+"("+rsargs+")"
try
{
result = "+"+eval(eval_str);
}
catch(e)
{
result = "-"+e.message+" (x_"+eval_str+")";
}
}
Response.write(result+"[sajax_result________end]]")
//exit()
}
this.show_common_js = function()
{
js_debug_mode = this.debug_mode
js_string_out = " // remote scripting library\n" +
" // (c) copyright 2005 modernmethod, inc\n" +
" var rs_debug_mode = "+js_debug_mode+";\n" +
" var rs_obj = false;\n" +
" var rs_callback = false;\n" +
" \n" +
" function rs_debug(text) {\n" +
" if (rs_debug_mode)\n" +
" alert('RSD: ' + text)\n" +
" }\n" +
" \n" +
" function rs_init_object() {\n" +
" rs_debug('rs_init_object() called..')\n" +
" \n" +
" var A;\n" +
" try {\n" +
" A=new ActiveXObject('Msxml2.XMLHTTP');\n" +
" } catch (e) {\n" +
" try {\n" +
" A=new ActiveXObject('Microsoft.XMLHTTP');\n" +
" } catch (oc) {\n" +
" A=null;\n" +
" }\n" +
" }\n" +
" if(!A && typeof XMLHttpRequest != 'undefined')\n" +
" A = new XMLHttpRequest();\n" +
" if (!A)\n" +
" rs_debug('Could not create connection object.');\n" +
" return A;\n" +
" }\n"
 
Response.write(js_string_out)
}
 
this.rs_esc=function(val)
{
}
this.export_function = function()
{
for(var i=0;i<arguments.length;i++)
{
this.export_list[arguments[i]] = arguments[i];
}
}
this.show_javascript = function()
{
if(!this.js_has_been_shown)
{
this.show_common_js()
this.js_has_been_shown = true
}
for(func_name in this.export_list)
{
this.show_one(func_name);
}
}
this.rs_esc = function(val)
{
var dqex = /\"/g //"
return val.replace(dqex, '\\\\"')
}
this.show_one=function(func_name)
{
var svr, srl, qsr;
svr = Request.ServerVariables("SERVER_NAME")
srl = Request.ServerVariables("URL")
qsr = Request.ServerVariables("QUERY_STRING");
uri = svr + srl + qsr;
 
if(!(uri.indexOf('?')>-1))
{
uri += "?rs=" + escape(func_name)
}
else
{
uri += "&rs=" + escape(func_name)
}
 
escapeduri = this.rs_esc(uri)
js_string_out = " // wrapper for "+func_name+"\n" +
" function x_"+func_name+"(){\n" +
" // count args; build URL\n" +
" var i, x, n;\n" +
" //var url = 'http://"+escapeduri+"', a = x_"+func_name+".arguments;\n" +
" url = 'http://"+escapeduri+"', a = x_"+func_name+".arguments;\n" +
" for (i = 0; i < a.length-1; i++)\n" +
" url = url + '&rsargs[]=' + escape(a[i]);\n" +
" x = rs_init_object();\n" +
" x.open('GET', url, true);\n" +
" x.onreadystatechange = function() {\n" +
" if (x.readyState != 4)\n" +
" return;\n" +
" rs_debug('received ' + x.responseText);\n" +
" \n" +
" var status;\n" +
" var data;\n" +
" status = x.responseText.charAt(0);\n" +
" data = x.responseText;\n" +
" var pos = data.indexOf('[sajax_result________end]]');\n " +
" if (status == '-'){\n" +
" if("+this.debug_mode+"){alert('Error: ' + data.substring(1,pos));}}\n" +
" else \n" +
" a[a.length-1](data.substring(1,pos));\n" +
" }\n" +
" x.send(null);\n" +
" rs_debug('x_"+func_name+" url = ' + url);\n" +
" rs_debug('x_"+func_name+" waiting..');\n" +
" }\n"
Response.write(js_string_out)
}
}
%>
/trunk/dependencies/sajax/coldfusion/Readme.txt
0,0 → 1,4
SAJAX COLDFUSION MX BACKEND
---------------------------
 
Contributed by Eric Moritz <eric.moritz@gmail.com>. Maintained by Steve Smith <steve@orderedlist.com> and Anders Jenbo <anders@jenbo.dk>
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/coldfusion/example_multiply.cfm
0,0 → 1,48
<cfinclude template="sajax.cfm">
<cfscript>
function multiply(x, y) {
return x * y;
}
// sajax_debug_mode = true;
sajax_failure_redirect = "http://sajax.info/sajaxfail.html";
sajax_export("multiply");
sajax_handle_client_request();
</cfscript>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sajax Multiplier example</title>
<script type="text/javascript" src="json2.stringify.js"></script>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse_state.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<cfscript>sajax_show_javascript();</cfscript>
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
// get the folder name
var x, y;
x = parseFloat(document.getElementById("x").value);
y = parseFloat(document.getElementById("y").value);
x_multiply(x, y, do_multiply_cb);
}
//-->
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3" />
*
<input type="text" name="y" id="y" value="3" size="3" />
=
<input type="text" name="z" id="z" value="" size="3" />
<input type="button" name="check" value="Calculate" onclick="do_multiply(); return false;" />
</body>
</html>
/trunk/dependencies/sajax/coldfusion/example_options.cfm
0,0 → 1,100
<cfinclude template="sajax.cfm">
<cfscript>
function test_get() {
return test();
}
function test_post() {
return test();
}
function test() {
s = "URI: example_options.cfm";
s = "#s#
-- GET --
";
if(isdefined("URL.rsargs"))
s = "#s##URL.rsargs#";
s = "#s#
 
-- POST --
";
if(isdefined("FORM.rsargs"))
s = "#s##FORM.rsargs#";
return s;
}
function get_the_time() {
return "#DateFormat(now(),"yyyy-mm-dd ")##TimeFormat(now() ,"HH:mm:ss")#";
}
function pause(sec) {
thread = CreateObject("java", "java.lang.Thread");
thread.sleep(sec*1000);
}
 
// $sajax_debug_mode = true;
 
//GET functions
sajax_request_type = "GET";
sajax_export("test_get", "get_the_time", "test", "otherefucntion2");
//POST functions
sajax_request_type = "POST";
sajax_export("test_post");
 
//synchronous GET functions
sajax_request_type = "GET";
sajax_request_asynchronous = "false";
sajax_export("pause");
 
//GET functions from a different uri
sajax_request_type = "GET";
sajax_remote_uri = "example_otheruri.cfm";
sajax_export("otherefucntion");
sajax_handle_client_request();
</cfscript>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Example of Sajax Options</title>
<script type="text/javascript" src="json2.stringify.js"></script>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse_state.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<cfscript>sajax_show_javascript();</cfscript>
function print_result(v) {
alert(v);
}
//-->
</script>
</head>
<body>
<!-- Testing if the browser supports GET -->
<button onclick="x_test_get(1, 2, 3, print_result);">Test GET</button>
 
<!-- Testing if the browser supports POST -->
<button onclick="x_test_post(1, 2, 3, print_result);">Test POST</button>
 
<!-- Forcing the function to POST -->
<button onclick="sajax_request_type ='POST'; x_test(1, 2, 3, print_result); sajax_request_type ='';">Test force POST</button>
 
<!-- if sajax_target_id is set, the sesponce will be inserted as HTML in an element with sajax_target_id for id-->
<button onclick="sajax_target_id = 'time'; x_get_the_time(); sajax_target_id = '';">Test updating IDs</button>
 
<!-- Calling a synchronous will cause the script to wait for the responce -->
<button onclick="x_pause(3, function(){}); alert('Link was clicked!');">Test synchronous</button>
 
<!-- Different URI set at config -->
<button onclick="x_otherefucntion(print_result);">Call to other uri.</button>
 
<!-- Forece different URI at runtime -->
<button onclick="sajax_remote_uri = 'example_otheruri.cfm'; x_otherefucntion2(print_result); sajax_remote_uri = '';">Force call to other uri.</button>
<div id="time"><em>Time will appear here</em></div>
</body>
</html>
/trunk/dependencies/sajax/coldfusion/example_otheruri.cfm
0,0 → 1,15
<cfinclude template="sajax.cfm">
<cfscript>
function otherefucntion() {
return "URI: example_otheruri.cfm";
}
function otherefucntion2() {
return otherefucntion();
}
//allowed functions
sajax_export("otherefucntion", "otherefucntion2");
sajax_handle_client_request();
</cfscript>
/trunk/dependencies/sajax/coldfusion/example_types.cfm
0,0 → 1,75
<cfinclude template="sajax.cfm">
<cfscript>
bday = "9/5/1983";
age = DateFormat(now(), "yyyy")-DateFormat(bday, "yyyy")-(DateFormat(bday, "m.dd")-DateFormat(now(), "m.dd"))/10;
function return_struct() {
struct = structNew();
struct["name"] = "Anders";
struct["age"] = age;
return struct;
}
function return_list() {
list = "";
list = listappend(list, "Anders");
list = listappend(list, age);
return list;
}
function return_float() {
return age;
}
function return_int() {
return int(age);
}
function return_string() {
return "Anders is #int(age)# years old.";
}
sajax_request_type = "GET";
// sajax_debug_mode = true;
sajax_export("return_struct", "return_list", "return_int", "return_float", "return_string");
sajax_handle_client_request();
</cfscript>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sajax ColdFusion return types example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="json2.stringify.js"></script>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse_state.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<cfscript>sajax_show_javascript();</cfscript>
function display_result(val) {
var repr;
repr = "";
repr += "Type: " + typeof val + "\n";
repr += "Value: ";
if (typeof val == "object" ||
typeof val == "array") {
repr += "{ ";
for (var i in val)
repr += i + ": " + val[i] + ", ";
repr = repr.substr(0, repr.length-2) + " }";
} else {
repr += val;
}
alert(repr);
}
//-->
</script>
</head>
<body>
<button onclick="x_return_struct(display_result);">Return as struct (will become an object)</button>
<button onclick="x_return_list(display_result);">Return as list (will become a string)</button>
<button onclick="x_return_int(display_result);">Return as int</button>
<button onclick="x_return_float(display_result);">Return as float/double</button>
<button onclick="x_return_string(display_result);">Return as string</button>
</body>
</html>
/trunk/dependencies/sajax/coldfusion/json2.parse.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/coldfusion/json2.stringify.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/coldfusion/json_parse.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/coldfusion/json_parse_state.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/coldfusion/json_stringify.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/coldfusion/sajax.cfm
0,0 → 1,148
<cfsilent>
 
<cfset sajax_version = "0.13">
<cfset sajax_debug_mode = false>
<cfset sajax_export_array = arraynew(1)>
<cfset sajax_export_list = "">
<cfset sajax_method_list = "">
<cfset sajax_asynchronous_list = "">
<cfset sajax_uri_list = "">
<cfset sajax_remote_uri = "">
<cfset sajax_failure_redirect = "">
<cfset sajax_request_type = "GET">
<cfset sajax_request_asynchronous = "true">
 
<!--- Always call server if this is a Sajax GET call --->
<cfif isdefined("URL.rs")>
<cfheader name="Cache-Control" value="max-age=0, must-revalidate">
<cfheader name="Pragma" value="no-cache">
</cfif>
 
<!--- emulate the php exit keyword --->
<cffunction name="exit">
<cfabort>
</cffunction>
 
<cffunction name="sajax_handle_client_request">
<cftry>
<cfsavecontent variable="output">
<cfscript>
if(not isdefined("URL.rs") and not isdefined("FORM.rs"))
return;
if(isdefined("URL.rs")) {
func_name = URL.rs;
if(isdefined("URL.rsargs"))
args = URL.rsargs;
} else {
func_name = FORM.rs;
if(isdefined("FORM.rsargs"))
args = FORM.rsargs;
}
if(isdefined("args")) {
args = DeserializeJSON(args);
} else {
args = arraynew(1);
}
if(not ListFindNoCase(sajax_export_list, func_name)) {
error = "#func_name# not callable";
} else {
result = SerializeJSON(call_user_func_array(func_name, args));
}
</cfscript>
</cfsavecontent>
<cfcatch>
<cfheader name="Content-Type" value="text/plain; charset=UTF-8">
<cfoutput>-:#cfcatch.type#
#cfcatch.message#
#cfcatch.detail#
<cfif arraylen(cfcatch.tagcontext) gt 0>
in #cfcatch.tagcontext[1].template# at #cfcatch.tagcontext[1].line#
</cfif>
</cfoutput>
<cfabort>
</cfcatch>
</cftry>
<cfheader name="Content-Type" value="text/plain; charset=UTF-8">
<cfscript>
//Remove start and end white space from output
output = REReplace(output,"^\s*|\s*$","","ALL");
if(isdefined("result") and "#output#" eq "")
writeoutput("+:#result#");
else if("#output#" eq "")
writeoutput("-:#error#");
else
writeoutput("-:#output#");
exit();
</cfscript>
</cffunction>
 
<cfscript>
sajax_js_has_been_shown = false;
function sajax_show_javascript()
{
 
if (not sajax_js_has_been_shown) {
writeoutput("
sajax_debug_mode = #iif(sajax_debug_mode, 'true', 'false')#;
sajax_failure_redirect = ""#sajax_failure_redirect#"";
");
//TODO get from an array instead of list
size = listlen(sajax_export_list);
for(i = 1; i lte size; i=i+1) {
name = listgetat(sajax_export_list, i);
method = listgetat(sajax_method_list, i);
asynchronous = listgetat(sajax_asynchronous_list, i);
uri = listgetat(sajax_uri_list, i);
if(uri == "##")
uri = "";
writeoutput("
function x_#name#() {
return sajax_do_call(""#name#"", arguments, ""#method#"", #asynchronous#, ""#uri#"");
}");
}
sajax_js_has_been_shown = true;
}
}
function sajax_export() {
//TODO make it a multi dimentional array of options
//TODO prevent multiple instances of the same functions
//if(not isarray(function))
var keys = structkeylist(arguments);
var size = listlen(keys);
var key = "";
for(i=1; i lte size;i=i+1) {
key = listgetat(keys, i);
sajax_export_list = listappend(sajax_export_list, arguments[key]);
sajax_method_list = listappend(sajax_method_list, sajax_request_type);
sajax_asynchronous_list = listappend(sajax_asynchronous_list, sajax_request_asynchronous);
if(sajax_remote_uri == "")
sajax_remote_uri = "##";
sajax_uri_list = listappend(sajax_uri_list, sajax_remote_uri);
if(sajax_remote_uri == "##")
sajax_remote_uri = "";
}
}
function call_user_func_array(user_func, arg_array) {
//TODO test with multi dimentional arrays
var func_call = "";
var func_args = "";
var size = ArrayLen(arg_array);
/* Loop though each of the args */
for(i=1; i lte size; i = i + 1) {
func_args = func_args & "arg_array[#i#]";
if(i lt size)
func_args = func_args & ",";
}
return evaluate("#user_func#(#func_args#)");
}
SAJAX_INCLUDED = 1;
</cfscript>
</cfsilent>
/trunk/dependencies/sajax/coldfusion/sajax.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/io/Sajax.io
0,0 → 1,203
//
// Sajax Io Backend
// (C) Copyright 2005 ModernMethod, Inc.
// Released under BSD license
//
 
String interpolate := method(
work := self clone
last_idx := 0
while (1,
idx := work find("<?io", last_idx)
if (idx == Nil,
// no more interps..
break)
idx := idx + 3
end_idx := work find("?>", idx + 1)
if (end_idx == Nil,
// invalid interp expression.. we're done.
break)
// in the case of an empty interpolated expression,
// lets move on
if (end_idx - idx == 1,
continue)
// otherwise proceed with replacement.
slotName := work substring(idx+1, end_idx)
find_str := "<?io" .. slotName .. "?>"
// write("doString(" .. slotName .. ")")
replace_str := sender doString(slotName)
work := work replace(find_str, replace_str)
last_idx = end_idx + 1
)
return work
)
 
Sajax := Object clone do (
 
debug_mode := 0
export_list := List clone
js_has_been_shown := Nil
init := method(
return self
)
handle_client_request := method(
if (my_getenv("QUERY_STRING") == Nil,
return
)
form := CGI clone parse
if (form hasKey("rs") == Nil,
return
)
 
write("Content-type: text/html\n");
write("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");
write("Cache-Control: no-cache, must-revalidate\n");
write("Pragma: no-cache\n\n");
func_name := form at("rs")
if (export_list contains(func_name) == Nil) then (
write("-:$func_name not callable\n")
) else (
write("+:")
args := form at("rsargs[]")
result := sender performWithArgList(func_name, args)
write(result)
)
exit;
}
show_common_js := method(
if (debug_mode == 1,
debugModeTrueFalse := "true",
debugModeTrueFalse := "false")
html := """
 
// remote scripting library
// (c) copyright 2005 modernmethod, inc
var rs_debug_mode = <?io debugModeTrueFalse ?>;
function rs_debug(text) {
if (rs_debug_mode)
alert("RSD: " + text)
}
function rs_init_object() {
rs_debug("rs_init_object() called..")
var A;
try {
A=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
A=new ActiveXObject("Microsoft.XMLHTTP");
} catch (oc) {
A=null;
}
}
if(!A && typeof XMLHttpRequest != "undefined")
A = new XMLHttpRequest();
if (!A)
rs_debug("Could not create connection object.");
return A;
}
"""
write(html interpolate)
}
esc := method(val,
return val replace("\"", "\\\\\"");
)
my_getenv := method(val,
my_get := Nil
if (?System) then (
my_get := System getSlot("getenv")
) else (
my_get := Object getSlot("getenv")
)
return my_get(val)
)
get_my_uri := method(
uri := "http://www.example.com/"
if (my_getenv("REQUEST_URI") != Nil) then (
uri := my_getenv("REQUEST_URI")
) else (
if (my_getenv("SCRIPT_NAME") != Nil) then (
uri := my_getenv("SCRIPT_NAME")
if (my_getenv("QUERY_STRING") != Nil) then (
uri := uri .. "?" .. my_getenv("QUERY_STRING")
)
)
)
return uri
)
 
show_one := method(func_name,
uri := get_my_uri
func_name_encoded := CGI encodeUrlParam(func_name)
if (uri contains("?") == Nil) then (
uri = uri .. "?rs=" .. func_name_encoded
) else (
uri = uri .. "&rs=" .. func_name_encoded
)
html := """
// wrapper for <?io func_name ?>
function x_<?io func_name ?>() {
// count args; build URL
var i, x, n;
var url = "<?io esc(uri) ?>";
var a = x_<?io func_name ?>.arguments;
for (i = 0; i < a.length-1; i++)
url = url + "&rsargs[]=" + escape(a[i]);
url = url + "&rsrnd=" + new Date().getTime();
x = rs_init_object();
x.open("GET", url, true);
x.onreadystatechange = function() {
if (x.readyState != 4)
return;
rs_debug("received " + x.responseText);
var status;
var data;
status = x.responseText.charAt(0);
data = x.responseText.substring(2);
if (status == "-")
alert("Error: " + callback_n);
else
a[a.length-1](data);
}
x.send(null);
rs_debug("x_<?io func_name ?> url = " + url);
rs_debug("x_<?io func_name ?> waiting..");
delete x;
}
"""
write(html interpolate)
)
 
export := method(func,
export_list add(func)
}
show_javascript := method(
if (js_has_been_shown == Nil,
show_common_js
)
export_list foreach(index, func_name,
show_one(func_name)
)
)
)
 
/trunk/dependencies/sajax/io/example_multiply.io
0,0 → 1,53
#!/usr/bin/env ioServer
 
c := CGI clone
 
multiply := method(x, y,
x := x asNumber
y := y asNumber
return x * y
)
 
s := Sajax clone
s debug_mode := 1
s init
s export("multiply")
s handle_client_request
 
write("Content-type: text/html\n\n")
 
html := """
<html>
<head>
<title>Multiplier</title>
<script>"""
write(html)
s show_javascript
html := """
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
// get the folder name
var x, y;
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_multiply(x, y, do_multiply_cb);
}
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3">
*
<input type="text" name="y" id="y" value="3" size="3">
=
<input type="text" name="z" id="z" value="" size="3">
<input type="button" name="check" value="Calculate"
onclick="do_multiply(); return false;">
</body>
</html>
"""
write(html)
/trunk/dependencies/sajax/lua/Readme.txt
0,0 → 1,6
SAJAX LUA BACKEND
-----------------
 
Contributed and copyighted by Javier Guerra (http://www.guerrag.com/).
 
 
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/lua/calculator.lp
0,0 → 1,46
<%
require "sajax"
function multiply(x, y)
return x * y
end
sajax.init()
-- $rs_debug_mode = 1;
sajax.export ("multiply", multiply)
if sajax.handle_client_request () then return end
%><html>
<head>
<title>Multiplier</title>
<script>
<%
sajax.show_javascript();
%>
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
// get the folder name
var x, y;
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_multiply(x, y, do_multiply_cb);
}
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3">
*
<input type="text" name="y" id="y" value="3" size="3">
=
<input type="text" name="z" id="z" value="" size="3">
<input type="button" name="check" value="Calculate"
onclick="do_multiply(); return false;">
</body>
</html>
/trunk/dependencies/sajax/lua/sajax.lua
0,0 → 1,135
module ("sajax")
 
local export_list = {}
local request_uri = ""
 
function init ()
end
 
function handle_client_request ()
 
if not cgi.rs then return end
-- Bust cache in the head
cgilua.header ("Expires", "Mon, 26 Jul 1997 05:00:00 GMT") -- Date in the past
cgilua.header ("Last-Modified", os.date ("!%a, %d %b %Y %H:%M:%S GMT"))
-- always modified
cgilua.header ("Cache-Control", "no-cache, must-revalidate") -- HTTP/1.1
cgilua.header ("Pragma", "no-cache") -- HTTP/1.0
local funcname = cgi.rs
if not export_list[funcname] then
cgilua.put (string.format ("-:%s not callable", funcname))
else
local func = export_list[funcname]
local rsargs = cgi["rsargs[]"]
local result
if not rsargs then
result = func()
elseif type (rsargs) == "string" then
result = func (rsargs)
elseif type (rsargs) == "table" then
result = func (unpack (rsargs))
else
return
end
cgilua.put ("+:")
cgilua.put (result)
end
return true
end
 
local function show_common_js ()
cgilua.put [[
// remote scripting library
// (c) copyright 2005 modernmethod, inc
var rs_debug_mode = false;
function rs_debug(text) {
if (rs_debug_mode)
alert("RSD: " + text)
}
function rs_init_object() {
rs_debug("rs_init_object() called..")
var A;
try {
A=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
A=new ActiveXObject("Microsoft.XMLHTTP");
} catch (oc) {
A=null;
}
}
if(!A && typeof XMLHttpRequest != "undefined")
A = new XMLHttpRequest();
if (!A)
rs_debug("Could not create connection object.");
return A;
}
]]
end
 
local function show_one (funcname)
local uri = request_uri
if string.find (uri, "?") then
uri = uri .. "&rs=" .. cgilua.urlcode.escape (funcname)
else
uri = uri .. "?rs=" .. cgilua.urlcode.escape (funcname)
end
cgilua.put (string.format ([[
// wrapper for %s
function x_%s() {
// count args; build URL
var i, x, n;
var url = "%s";
var a = x_%s.arguments;
for (i = 0; i < a.length-1; i++)
url = url + "&rsargs[]=" + escape(a[i]);
url = url + "&rsrnd=" + new Date().getTime();
x = rs_init_object();
x.open("GET", url, true);
x.onreadystatechange = function() {
if (x.readyState != 4)
return;
rs_debug("received " + x.responseText);
var status;
var data;
status = x.responseText.charAt(0);
data = x.responseText.substring(2);
if (status == "-")
alert("Error: " + callback_n);
else
a[a.length-1](data);
}
x.send(null);
rs_debug("x_%s url = " + url);
rs_debug("x_%s waiting..");
delete x;
}
]], funcname, funcname, uri, funcname, funcname, funcname))
end
 
function export (funcname, func)
export_list[funcname] = func
end
 
local js_has_been_shown = false
 
function show_javascript ()
if not js_has_been_shown then
show_common_js ()
js_has_been_shown = true
end
for fn,_ in pairs (export_list) do
show_one (fn)
end
end
/trunk/dependencies/sajax/perl/Readme.txt
0,0 → 1,7
SAJAX PERL BACKEND
------------------
 
Contributed and copyighted by Nathan Schmidt (http://www.hinathan.com/).
Additional guidance and consultation by Jason Purdy and Nate Mueller.
 
 
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/perl/Sajax.pm
0,0 → 1,184
package Sajax;
use Data::Dumper;
 
my $rs_debug_mode = 0;
my $rs_js_has_been_shown = 0;
my %rs_export_list = ();
my %rs_coderef_list = ();
 
sub incl_sajax {
}
sub rs_init {
$rs_debug_mode = 0;
$rs_js_has_been_shown = 0;
%rs_export_list = ();
%rs_coderef_list = ();
 
}
sub rs_handle_client_request {
my($q)=@_;
my $rv="";
if (!defined $q->param("rs")) {
return undef;
}
my $func_name = $q->param("rs");
 
if ( defined $rs_export_list{$func_name}) {
$rv .= "+:";
eval {
$rv .= &$func_name($q->param("rsargs"));
};
if($@) {
print STDERR "Err:[$@]\n";
}
} elsif ( defined $rs_coderef_list{$func_name}) {
$rv .= "+:";
my $cr = $rs_coderef_list{$func_name};
eval {
$rv .= &$cr($q->param("rsargs"));
};
if($@) {
print STDERR "Err:[$@]\n";
}
} else {
$rv .= "-:$func_name not callable";
}
return $rv;
}
sub rs_show_common_js() {
my $rv = "";
my $debug_mode = $rs_debug_mode ? "true" : "false";
my $CC = "\n// Perl backend version (c) copyright 2005 Nathan Schmidt";
$CC = "";
$rv .= <<EOT;
// remote scripting library
// (c) copyright 2005 modernmethod, inc$CC
var rs_debug_mode = $debug_mode;
var rs_obj = false;
var rs_callback = false;
 
function rs_debug(text) {
if (rs_debug_mode)
alert("RSD: " + text)
}
function rs_init_object() {
rs_debug("rs_init_object() called..")
var A;
try {
A=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
A=new ActiveXObject("Microsoft.XMLHTTP");
} catch (oc) {
A=null;
}
}
if(!A && typeof XMLHttpRequest != "undefined")
A = new XMLHttpRequest();
if (!A)
rs_debug("Could not create connection object.");
return A;
}
EOT
return $rv;
}
 
 
#javascript escape a value
sub rs_esc {
my ($val)=@_;
$val =~ s/\"/\\\\\"/;
return $val;
}
 
sub rs_urlencode {
my($enc) = @_;
$enc =~ s/^\s+|\s+$//gs;
$enc =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;
$enc =~ s/ /\+/g;
$enc =~ s/%20/\+/g;
return $enc;
}
 
sub rs_show_one {
my($q,$func_name)=@_;
my $rv = "";
my $uri = $q->url(-query=>1);
if ($uri =~ m/\?/) {
$uri .= "&rs=".rs_urlencode($func_name);
} else {
$uri .= "?rs=".rs_urlencode($func_name);
}
 
my $urie = rs_esc($uri);
 
$rv .= <<EOT;
 
// wrapper for $func_name
function x_$func_name() {
// count args; build URL
var i, x, n;
var url = "$urie", a = x_$func_name.arguments;
for (i = 0; i < a.length-1; i++)
url = url + "&rsargs=" + escape(a[i]);
url = url.replace( /[+]/g, '%2B'); // fix the unescaped plus signs
x = rs_init_object();
x.open("GET", url, true);
x.onreadystatechange = function() {
if (x.readyState != 4)
return;
rs_debug("received " + x.responseText);
var status;
var data;
status = x.responseText.charAt(0);
data = x.responseText.substring(2);
if (status == "-")
alert("Error: " + callback_n);
else
a[a.length-1](data);
}
x.send(null);
rs_debug("x_$func_name url = " + url);
rs_debug("x_$func_name waiting..");
}
 
 
EOT
return $rv;
}
 
sub rs_register {
my($fn,$coderef)=@_;
$rs_coderef_list{$fn} = $coderef;
}
sub rs_export {
map {$rs_export_list{$_}=$_} @_;
return;
}
 
sub rs_show_javascript {
my ($q) = @_;
my $rv = "";
if (! $rs_js_has_been_shown) {
$rv .= rs_show_common_js();
$rs_js_has_been_shown = 1;
}
 
foreach my $func (keys %rs_export_list) {
$rv .= rs_show_one($q,$func);
}
foreach my $func (keys %rs_coderef_list) {
$rv .= rs_show_one($q,$func);
}
 
return $rv;
}
 
1;
Property changes:
Added: svn:mime-type
+text/x-perl
\ No newline at end of property
/trunk/dependencies/sajax/perl/example_multiply.cgi
0,0 → 1,113
#! /usr/bin/perl -w
 
# Perl version cloned from the original PHP by http://www.modernmethod.com/sajax/
# I've left commented-out examples in the code for running with static methods.
# For moving to ModPerl it's important to no be redefining subs all the time,
# so this code adds the rs_register(funcname,coderef) call, which takes a coderef
# rather than the name of a sub to be called.
 
 
use Sajax;
use CGI;
 
my $q = new CGI;
 
my $rv = "";
 
$rv .= "content-type: text/html\n\n";
 
 
=pod
#for static method calls
sub Sajax::multiply {
my($x, $y)=@_;
return $x * $y;
}
sub Sajax::divide {
my($x, $y)=@_;
return $x / $y;
}
=cut
 
#equivalent modperl methods
my $msub = sub {
my($x, $y)=@_;
return $x * $y;
};
my $dsub = sub {
my($x, $y)=@_;
return $x / $y;
};
 
 
 
Sajax::rs_init();
 
#register static methods (called by name)
#Sajax::rs_export("multiply","divide");
 
#modperl methods (called as anonymous coderefs)
Sajax::rs_register("multiply",$msub);
Sajax::rs_register("divide",$dsub);
 
 
my $handled_value = Sajax::rs_handle_client_request($q);
 
if(defined $handled_value) {
$rv .= $handled_value;
} else {
 
$rv .= "<html>\n<head>\n<title>Multiplier</title>\n<script>\n\n";
 
$rv .= Sajax::rs_show_javascript($q);
 
$rv .= <<EOT;
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_divide_cb(z) {
document.getElementById("zz").value = z;
}
 
 
function do_multiply() {
var x, y;
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_multiply(x, y, do_multiply_cb);
}
 
function do_divide() {
var x, y;
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_divide(x, y, do_divide_cb);
}
EOT
 
 
$rv .= "</script>\n\n</head>\n";
$rv .= <<EOT;
<body>
<input type="text" name="x" id="x" value="2" size="3">
*
<input type="text" name="y" id="y" value="3" size="3">
=
<input type="text" name="z" id="z" value="" size="5">
<input type="text" name="zz" id="zz" value="" size="5">
<input type="button" name="check" value="Multiply" onclick="do_multiply(); return false;">
<input type="button" name="check" value="Divide" onclick="do_divide(); return false;">
<input type="button" name="check" value="Both" onclick="do_multiply();do_divide(); return false;">
 
<BR>
<A HREF=showsource.cgi>Show source</A>
</body>
</html>
EOT
}
 
 
print $rv;
 
 
 
/trunk/dependencies/sajax/php/Readme.txt
0,0 → 1,33
SAJAX PHP BACKEND
-----------------
 
Contributed and copyighted by Thomas Lackner (http://www.modernmethod.com/) and Anders Jenbo.
 
If you are using PHP < 5.2 you will need to a substitue for JSON_encode and JSON_decode, you might want to try this out http://abeautifulsite.net/notebook/71
 
Usage:
sajax_export() takes a list of functions that are alowed to be called from javascript, there are 4 parameters for each function you send to sajax_export. If strings are used in stead of arrays the functions will just have all options set to there default (like in older versions of Sajax).
 
name = the name of the function (requred)
method = GET : POST (default is GET)
asynchronous = true : false (default is true, if set to false the script will pause untill the call has been compleated)
uri = the uri where the function lives.
 
The default method can be changed by setting $sajax_request_type to "POST" (this can also be done at runtime).
The default uri can be changed by setting $sajax_remote_uri (this can also be done at runtime).
 
Sample:
sajax_export(
"myFunction",
array("name" => "myPostFunction", "method" => "POST"),
array("name" => "sleep", "asynchronous" => true),
array("name" => "myOffSitefunction", "uri" => "http://myotheresite.com/ajax.php")
);
 
sajax_export() may be called multiple times.
 
To get debug alert's set $sajax_debug_mode to true.
 
You can redirect the users browser to a frindly error page incase his/her borwser issn't supported by sajax by setting $sajax_failure_redirect to an URI.
 
Calling sajax_get_common_js() will print the client side script.
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/php/example_multiply.php
0,0 → 1,48
<?php
function multiply($x, $y) {
return $x * $y;
}
require("sajax.php");
// $sajax_debug_mode = true;
$sajax_failure_redirect = "http://sajax.info/sajaxfail.html";
sajax_export("multiply");
sajax_handle_client_request();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sajax Multiplier example</title>
<script type="text/javascript" src="json2.stringify.js"></script>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse_state.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<?php sajax_show_javascript(); ?>
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
// get the folder name
var x, y;
x = parseFloat(document.getElementById("x").value);
y = parseFloat(document.getElementById("y").value);
x_multiply(x, y, do_multiply_cb);
}
//-->
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3" />
*
<input type="text" name="y" id="y" value="3" size="3" />
=
<input type="text" name="z" id="z" value="" size="3" />
<input type="button" name="check" value="Calculate" onclick="do_multiply(); return false;" />
</body>
</html>
/trunk/dependencies/sajax/php/example_options.php
0,0 → 1,83
<?php
date_default_timezone_set('Europe/Copenhagen');
function test_get() {
return test();
}
function test_post() {
return test();
}
function test() {
$s = "URI: ".$_SERVER['PHP_SELF'];
$s .= "\n\n-- GET --\n";
if(!empty($_GET["rsargs"]))
$s .= $_GET["rsargs"];
$s .= "\n-- POST --\n";
if(!empty($_POST["rsargs"]))
$s .= $_POST["rsargs"];
return $s;
}
function get_the_time() {
return date("Y-m-d h:i:s");
}
require_once("sajax.php");
// $sajax_debug_mode = true;
$sajax_failure_redirect = "http://sajax.info/sajaxfail.html";
sajax_export(
array("name" => "test_get", "method" => "GET"),
array("name" => "test_post", "method" => "POST"),
array("name" => "get_the_time", "method" => "GET"),
array("name" => "test", "method" => "GET"),
array("name" => "sleep", "asynchronous" => false),
array("name" => "otherefucntion", "uri" => "example_otheruri.php"),
array("name" => "otherefucntion2")
);
sajax_handle_client_request();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Example of Sajax Options</title>
<script type="text/javascript" src="json2.stringify.js"></script>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse_state.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<?php sajax_show_javascript(); ?>
function print_result(v) {
alert(v);
}
//-->
</script>
</head>
<body>
<!-- Testing if the browser supports GET -->
<button onclick="x_test_get(1, 2, 3, print_result);">Test GET</button>
 
<!-- Testing if the browser supports POST -->
<button onclick="x_test_post(1, 2, 3, print_result);">Test POST</button>
 
<!-- Forcing the function to POST -->
<button onclick="sajax_request_type ='POST'; x_test(1, 2, 3, print_result); sajax_request_type ='';">Test force POST</button>
 
<!-- if sajax_target_id is set, the sesponce will be inserted as HTML in an element with sajax_target_id for id-->
<button onclick="sajax_target_id = 'time'; x_get_the_time(); sajax_target_id = '';">Test updating IDs</button>
 
<!-- Calling a synchronous will cause the script to wait for the responce -->
<button onclick="x_sleep(3, function(){}); alert('Link was clicked!');">Test synchronous</button>
 
<!-- Different URI set at config -->
<button onclick="x_otherefucntion(print_result);">Call to other uri.</button>
 
<!-- Forece different URI at runtime -->
<button onclick="sajax_remote_uri = 'example_otheruri.php'; x_otherefucntion2(print_result); sajax_remote_uri = '';">Force call to other uri.</button>
<div id="time"><em>Time will appear here</em></div>
</body>
</html>
/trunk/dependencies/sajax/php/example_otheruri.php
0,0 → 1,13
<?php
function otherefucntion() {
return "URI: ".$_SERVER['PHP_SELF'];
}
function otherefucntion2() {
return otherefucntion();
}
require("sajax.php");
sajax_export("otherefucntion", "otherefucntion2");
sajax_handle_client_request();
?>
/trunk/dependencies/sajax/php/example_types.php
0,0 → 1,85
<?php
date_default_timezone_set('Europe/Copenhagen');
$bday = strtotime("5 September 1983");
$age = (date('z')-date('z', $bday))/1000+date('Y')-date('Y', $bday);
function return_array() {
global $age;
return array("name" => "Anders", "age" => $age);
}
function return_object() {
global $age;
class MyObj {
var $name, $age;
function MyObj($name, $age) {
$this->name = $name;
$this->age = $age;
}
}
$o = new MyObj("Anders", $age);
return $o;
}
function return_int() {
global $age;
return floor($age);
}
function return_float() {
global $age;
return $age;
}
function return_string() {
global $age;
return "Anders is ".floor($age)." years old.";
}
require("sajax.php");
$sajax_request_type = "GET";
// $sajax_debug_mode = true;
$sajax_failure_redirect = "http://sajax.info/sajaxfail.html";
sajax_export("return_array", "return_object", "return_int", "return_float", "return_string");
sajax_handle_client_request();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sajax PHP return types example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="json2.stringify.js"></script>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse_state.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<?php sajax_show_javascript(); ?>
function display_result(val) {
var repr;
repr = "";
repr += "Type: " + typeof val + "\n";
repr += "Value: ";
if (typeof val == "object" ||
typeof val == "array") {
repr += "{ ";
for (var i in val)
repr += i + ": " + val[i] + ", ";
repr = repr.substr(0, repr.length-2) + " }";
} else {
repr += val;
}
alert(repr);
}
//-->
</script>
</head>
<body>
<button onclick="x_return_array(display_result);">Return as array (will become an object)</button>
<button onclick="x_return_object(display_result);">Return as object</button>
<button onclick="x_return_int(display_result);">Return as int</button>
<button onclick="x_return_float(display_result);">Return as float/double</button>
<button onclick="x_return_string(display_result);">Return as string</button>
</body>
</html>
/trunk/dependencies/sajax/php/example_wall.php
0,0 → 1,122
<?php
//
// The world's least efficient wall implementation (now a bit more efficient)
//
date_default_timezone_set('Europe/Copenhagen');
$filename = "tmp/wall.html";
function colorify_ip($ip)
{
$parts = explode(".", $ip);
$color = sprintf("%02s", dechex($parts[1])) .
sprintf("%02s", dechex($parts[2])) .
sprintf("%02s", dechex($parts[3]));
return $color;
}
function add_line($msg) {
global $filename;
$f = fopen($filename, "a");
$date = date("Y-m-d h:i:s");
$msg = strip_tags(stripslashes($msg));
$remote = $_SERVER["REMOTE_ADDR"];
// generate unique-ish color for IP
$color = colorify_ip($remote);
fwrite($f, '<span style="color:#'.$color.'">'.$date.'</span> '.htmlspecialchars($msg).'<br />'."\r\n");
fclose($f);
return refresh(0);
}
function refresh($lastrefresh) {
global $filename;
if(filemtime($filename) > $lastrefresh) {
$lines = file($filename);
// return the last 25 lines
return array("wall" => join("\n", array_slice($lines, -25)), "update" => filemtime($filename));
} else {
return false;
}
}
require("sajax.php");
// $sajax_debug_mode = true;
$sajax_failure_redirect = "http://sajax.info/sajaxfail.html";
sajax_export(
array("name" => "add_line", "method" => "POST"),
array("name" => "refresh", "method" => "GET")
);
sajax_handle_client_request();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sajax graffiti wall example</title>
<style type="text/css">
.date {
color: blue;
}
</style>
<script type="text/javascript" src="json_stringify.js"></script>
<script type="text/javascript" src="json_parse.js"></script>
<script type="text/javascript" src="sajax.js"></script>
<script type="text/javascript"><!--
<?php sajax_show_javascript(); ?>
var check_n = 1;
var nextrefresh;
function refresh_cb(data) {
if(data !== false) {
document.getElementById("wall").innerHTML = data["wall"];
lastrefresh = data["update"];
clearTimeout(nextrefresh);
nextrefresh = setTimeout("refresh();", 1000);
} else {
clearTimeout(nextrefresh);
nextrefresh = setTimeout("refresh();", 2500);
}
document.getElementById("status").innerHTML = "Checked #" + check_n++;
}
var lastrefresh = <?php echo(filemtime($filename)); ?>;
function refresh() {
document.getElementById("status").innerHTML = "Checking..";
x_refresh(lastrefresh, refresh_cb);
}
function add() {
var line;
var handle;
handle = document.getElementById("handle").value;
line = document.getElementById("line").value;
if(line == "")
return;
x_add_line("[" + handle + "] " + line, refresh_cb);
document.getElementById("line").value = "";
}
function keypress(keyCode) {
if (keyCode==13) {
add();
document.getElementById("line").select();
return false;
}
return true;
}
nextrefresh = setTimeout("refresh();", 1000);
//-->
</script>
</head>
<body>
<b><a href="http://www.sajax.info/">Sajax</a> v<?php echo($sajax_version); ?></b> - You are a guinea pig - This example illustrates the simplest possible graffiti wall. It isn't meant to be perfect, featureful, or even useful.<br />
<form action="" method="post" onsubmit="add(); return false;">
<input type="text" name="handle" id="handle" value="(name)" onfocus="this.select()" style="width:130px;" />
<input type="text" name="line" id="line" value="(enter your message here)" onfocus="this.select();" onkeypress="keypress(event.keyCode);" style="width:300px;" />
<input type="button" name="check" value="Post message" onclick="add(); return false;" />
</form>
<div id="wall"> <?php $temp = refresh(0); echo($temp["wall"]); ?></div>
<div id="status">Checked #0</div>
</body>
</html>
/trunk/dependencies/sajax/php/json2.parse.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/php/json2.stringify.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/php/json_parse.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/php/json_parse_state.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/php/json_stringify.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/php/sajax.js
Cannot display: file marked as a binary type.
svn:mime-type = application/javascript
Property changes:
Added: svn:mime-type
+application/javascript
\ No newline at end of property
/trunk/dependencies/sajax/php/sajax.php
0,0 → 1,141
<?php
if (!isset($SAJAX_INCLUDED)) {
/*
* GLOBALS AND DEFAULTS
*
*/
$GLOBALS['sajax_version'] = "0.13";
$GLOBALS['sajax_debug_mode'] = false;
$GLOBALS['sajax_export_array'] = array();
$GLOBALS['sajax_export_list'] = array();
$GLOBALS['sajax_remote_uri'] = "";
$GLOBALS['sajax_failure_redirect'] = "";
$GLOBALS['sajax_request_type'] = "GET";
/*
* CODE
*
*/
function sajax_handle_client_request() {
if (empty($_GET["rs"]) && empty($_POST["rs"]))
return;
ob_start();
if (!empty($_GET["rs"])) {
// Always call server
header ("Cache-Control: max-age=0, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$func_name = $_GET["rs"];
if (! empty($_GET["rsargs"]))
$args = $_GET["rsargs"];
} else {
$func_name = $_POST["rs"];
if (! empty($_POST["rsargs"]))
$args = $_POST["rsargs"];
}
if(! empty($args)) {
if(get_magic_quotes_gpc())
$args = stripslashes($args);
$args = json_decode($args, true);
if(get_magic_quotes_gpc()) {
function array_addslashes($value) {
if(is_array($value))
return array_map("array_addslashes", $value);
else
return addslashes($value);
}
$args = array_map("array_addslashes", $args);
}
} else {
$args = array();
}
global $sajax_export_list;
if (! in_array($func_name, $sajax_export_list)) {
$error = $func_name." not callable";
} else {
$result = call_user_func_array($func_name, $args);
$error = ob_get_contents();
ob_end_clean();
}
header('Content-Type: text/plain; charset=UTF-8');
if(!empty($error)) {
echo '-:'.$error;
} else {
echo "+:".json_encode($result);
}
exit;
}
$sajax_js_has_been_shown = false;
function sajax_show_javascript()
{
global $sajax_js_has_been_shown;
global $sajax_debug_mode;
global $sajax_failure_redirect;
if (! $sajax_js_has_been_shown) {
?>
sajax_debug_mode = <?php echo($sajax_debug_mode ? "true" : "false"); ?>;
sajax_failure_redirect = "<?php echo($sajax_failure_redirect); ?>";
<?php
global $sajax_export_array;
foreach($sajax_export_array as $function) {
?>
function x_<?php echo($function["name"]); ?>() {
return sajax_do_call("<?php echo($function["name"]); ?>", arguments, "<?php echo($function["method"]); ?>", <?php echo($function["asynchronous"] ? 'true' : 'false'); ?>, "<?php echo($function["uri"]); ?>");
}
<?php
}
$sajax_js_has_been_shown = true;
}
}
function sajax_export() {
global $sajax_export_array;
global $sajax_export_list;
global $sajax_request_type;
global $sajax_remote_uri;
$num = func_num_args();
for ($i=0; $i<$num; $i++) {
$function = func_get_arg($i);
if(!is_array($function))
$function = array("name" => $function);
if(!isset($function["method"]))
$function["method"] = $sajax_request_type;
if(!isset($function["asynchronous"]))
$function["asynchronous"] = true;
if(!isset($function["uri"]))
$function["uri"] = $sajax_remote_uri;
$key = array_search($function["name"], $sajax_export_list);
if ($key === false) {
$sajax_export_array[] = $function;
$sajax_export_list[] = $function["name"];
} else {
//Overwrite old function
$sajax_export_array[$key] = $function;
$sajax_export_list[$key] = $function["name"];
}
}
}
$SAJAX_INCLUDED = 1;
}
?>
/trunk/dependencies/sajax/php/tmp/wall.html
0,0 → 1,46
<span style="color:#5b024d">2009-08-21 12:42:37</span> [Netscape 6.0] Shows fail page correctly<br />
<span style="color:#5b024d">2009-08-21 12:42:37</span> [Netscape 6.1] Shows fail page correctly<br />
<span style="color:#3ca206">2009-08-22 12:37:12</span> [Mozilla 0.9.4] Works *<br />
<span style="color:#5b024d">2009-08-21 08:26:49</span> [Mozilla 0.9.9] Works<br />
<span style="color:#5b024d">2009-08-21 12:38:53</span> [Firefox 2.0.0.20] Works<br />
<span style="color:#5b024d">2009-08-21 12:41:09</span> [Firefox 3.5.2] Works<br />
<span style="color:#5b024d">2009-08-21 12:42:37</span> [IE 4] Failes horribly<br />
<span style="color:#fbc320">2009-08-22 03:32:36</span> [Fennec M10] Works<br />
<span style="color:#5b024d">2009-08-21 12:42:37</span> [IE 5.01] Works<br />
<span style="color:#5b024d">2009-08-21 12:42:30</span> [IE 5.5] Works<br />
<span style="color:#5b024d">2009-08-21 12:42:20</span> [IE 6] Works<br />
<span style="color:#5b024d">2009-08-21 12:41:56</span> [IE 7] Works<br />
<span style="color:#5b024d">2009-08-21 12:41:41</span> [IE 8] Works<br />
<span style="color:#fbc320">2009-08-22 02:42:44</span> [Pocket Interrnet Explorer 7.11] Works<br />
<span style="color:#5b024d">2009-08-21 01:47:23</span> [iCab 3.0.5] Works **<br />
<span style="color:#5b024d">2009-08-21 06:13:48</span> [Safari 1.0] Shows fail page correctly<br />
<span style="color:#5b024d">2009-08-21 06:13:48</span> [Safari 1.1] Shows fail page correctly<br />
<span style="color:#5b024d">2009-08-21 06:13:48</span> [Safari 1.2] Works<br />
<span style="color:#5b024d">2009-08-21 08:20:58</span> [Safari 1.3] Works<br />
<span style="color:#5b024d">2009-08-21 09:02:25</span> [Safari 1.3.1] Works<br />
<span style="color:#5b024d">2009-08-21 12:38:37</span> [Safari 1.3.2] Works<br />
<span style="color:#fbc302">2009-08-24 03:17:34</span> [Safari 2.0] Works<br />
<span style="color:#fbc302">2009-08-24 03:18:16</span> [Safari 2.0.2] Works<br />
<span style="color:#fbc302">2009-08-24 03:18:58</span> [Safari 2.0.3] Works<br />
<span style="color:#fbc302">2009-08-24 03:19:31</span> [Safari 2.0.4] Works<br />
<span style="color:#3ca206">2009-08-22 12:41:35</span> [Safari 3.0] Works<br />
<span style="color:#5b024d">2009-08-21 08:45:50</span> [Safari 3.0.4] Works<br />
<span style="color:#fbc302">2009-08-24 03:15:07</span> [Safari 3.1.2] Works<br />
<span style="color:#fbc302">2009-08-24 03:15:54</span> [Safari 3.2.1] Works<br />
<span style="color:#fbc31f">2009-08-23 02:23:18</span> [Safari 3.2.3] Works<br />
<span style="color:#5b024d">2009-08-21 10:17:10</span> [Safari 4.0.3] Works<br />
<span style="color:#fbc320">2009-08-22 01:58:58</span> [iPhone 3.0.1] Works<br />
<span style="color:#5b024d">2009-08-21 08:36:46</span> [Google Chrome 2.0.172.39] Works<br />
<span style="color:#3ca206">2009-08-22 12:39:57</span> [Opera 8.0] Works *<br />
<span style="color:#3ca206">2009-08-22 02:30:58</span> [Opera 8.01] Only with GET<br />
<span style="color:#3ca206">2009-08-22 01:57:33</span> [Opera 8.02] Works<br />
<span style="color:#3ca206">2009-08-22 01:50:09</span> [Opera 8.50] Works<br />
<span style="color:#5b024d">2009-08-21 06:32:43</span> [Opera 8.54] Works<br />
<span style="color:#5b024d">2009-08-21 12:41:17</span> [Opera 9.64] Works<br />
<span style="color:#5b024d">2009-08-21 06:31:49</span> [Opera 10b] Works<br />
<span style="color:#5b024d">2009-08-24 12:26:46</span> [Opera 10b3] Works<br />
<span style="color:#fbc320">2009-08-22 03:15:22</span> [Opera Mobile 8.65] Works<br />
<span style="color:#fbc320">2009-08-22 02:38:22</span> [Opera Mobile 9.5] Works<br />
<span style="color:#fbc320">2009-08-22 03:07:59</span> [Opera Mobile 9.7b] Works<br />
<span style="color:#cb6018">2009-08-22 03:09:52</span> [Opera Mobile 9.7b Turbo] Works<br />
<span style="color:#bd8e2a">2009-08-22 02:40:12</span> [Opera Mini 4.2] Works<br />
Property changes:
Added: svn:mime-type
+text/html
\ No newline at end of property
/trunk/dependencies/sajax/python/License.txt
0,0 → 1,0
This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/python/Readme.txt
0,0 → 1,9
SAJAX PYTHON BACKEND
--------------------
 
Contributed and copyighted by Adam Collard. Additional guidance and
consultation by Carlos Bueno.
 
IMPORTANT: This backend is NOT licensed under the BSD-L. It is licensed
under the Creative Commons "By" License version 2.0. Please see
License.txt for details.
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/python/multiply.py
0,0 → 1,46
#!/usr/bin/env python
import cgitb;cgitb.enable()
import sajax1
 
def multiply(x,y):
try:
float_x, float_y = float(x), float(y)
except:
return 0
return float_x * float_y
 
sajax1.sajax_init()
sajax1.sajax_export(multiply)
sajax1.sajax_handle_client_request()
 
print """
<html>
<head>
<title>PyMultiplier</title>
<script>
"""
sajax1.sajax_show_javascript()
print """
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
var x, y;
 
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_multiply(x, y, do_multiply_cb);
}
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3">
*
<input type="text" name="y" id="y" value="3" size="3">
=
<input type="text" name="z" id="z" value="" size="3">
<input type="button" name="check" value="Calculate"
onclick="do_multiply(); return false;">
</body>
</html>
""" % locals()
Property changes:
Added: svn:mime-type
+text/x-python
\ No newline at end of property
/trunk/dependencies/sajax/python/sajax1.py
0,0 → 1,149
#!/usr/bin/env python
import cgi
import cgitb; cgitb.enable()
import os
import sys
import datetime
import urllib
 
print "Content-type: text/html"
 
sajax_debug_mode = False
sajax_export_list = {}
sajax_js_has_been_shown = False
 
form = cgi.FieldStorage()
 
def sajax_init():
pass
def sajax_handle_client_request():
func_name = form.getfirst('rs')
if func_name is None:
return
# Bust cache in the head
print "Expires: Mon, 26 Jul 1997 05:00:00 GMT"
print "Last-Modified: %s GMT" % datetime.datetime.utcnow().strftime(
"%a, %d %m %H:%M:%S")
# always modified
print "Cache-Control: no-cache, must-revalidate" # HTTP/1.1
print "Pragma: no-cache" # HTTP/1.0
print
if not func_name in sajax_export_list:
print "-:%s not callable" % func_name
else:
print "+:",
rsargs = form.getlist('rsargs[]')
result = sajax_export_list[func_name](*rsargs)
print result
sys.exit()
def sajax_get_common_js():
sajax_debug_modeJS = str(sajax_debug_mode).lower()
return """\
// remote scripting library
// (c) copyright 2005 modernmethod, inc
var sajax_debug_mode = %(sajax_debug_modeJS)s;
function sajax_debug(text) {
if (sajax_debug_mode)
alert("RSD: " + text)
}
function sajax_init_object() {
sajax_debug("sajax_init_object() called..")
var A;
try {
A=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
A=new ActiveXObject("Microsoft.XMLHTTP");
} catch (oc) {
A=null;
}
}
if(!A && typeof XMLHttpRequest != "undefined")
A = new XMLHttpRequest();
if (!A)
sajax_debug("Could not create connection object.");
return A;
}
function sajax_do_call(func_name, url, args) {
var i, x, n;
for (i = 0; i < args.length-1; i++)
url = url + "&rsargs[]=" + escape(args[i]);
url = url + "&rsrnd=" + new Date().getTime();
x = sajax_init_object();
x.open("GET", url, true);
x.onreadystatechange = function() {
if (x.readyState != 4)
return;
sajax_debug("received " + x.responseText);
var status;
var data;
status = x.responseText.charAt(0);
data = x.responseText.substring(2);
if (status == "-")
alert("Error: " + data);
else
args[args.length-1](data);
}
x.send(null);
sajax_debug(func_name + " url = " + url);
sajax_debug(func_name + " waiting..");
delete x;
}
""" % locals()
 
def sajax_show_common_js():
print sajax_get_common_js()
 
def sajax_esc(val):
return val.replace('"', '\\\\"')
 
def sajax_get_one_stub(func_name):
uri = os.environ['SCRIPT_NAME']
if os.environ.has_key('QUERY_STRING'):
uri += "?" + os.environ['QUERY_STRING'] + "&rs=%s" % urllib.quote_plus(func_name)
else:
uri += "?rs=%s" % urllib.quote_plus(func_name)
escapeduri = sajax_esc(uri)
return """
// wrapper for %(func_name)s
function x_%(func_name)s(){
// count args; build URL
sajax_do_call("%(func_name)s",
"%(escapeduri)s",
x_%(func_name)s.arguments);
}
""" % locals()
 
def sajax_show_one_stub(func_name):
print sajax_get_one_stub(func_name)
 
def sajax_export(*args):
decorated = [(f.func_name, f) for f in args]
sajax_export_list.update(dict(decorated))
def sajax_get_javascript():
global sajax_js_has_been_shown
 
html = ''
if not sajax_js_has_been_shown:
html += sajax_get_common_js()
sajax_js_has_been_shown = True
for func_name in sajax_export_list.iterkeys():
html += sajax_get_one_stub(func_name)
 
return html
 
def sajax_show_javascript():
print sajax_get_javascript()
Property changes:
Added: svn:mime-type
+text/x-python
\ No newline at end of property
/trunk/dependencies/sajax/python/wall.py
0,0 → 1,90
#!/usr/bin/env python
import cgi
import cgitb;cgitb.enable()
import datetime
import os
 
import sajax1
 
WALLFILE = '/tmp/wall.html'
 
if not os.path.exists(WALLFILE):
fh = open(WALLFILE, 'w')
fh.close()
 
def colourify_ip(ip):
colour = ''.join(['%02x' % int(part) for part in ip.split('.')[-3:]])
return colour
def add_line(msg):
f = open("/tmp/wall.html","a")
dt = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S")
msg = cgi.escape(msg)
remote = os.environ['REMOTE_ADDR']
colour = colourify_ip(remote)
f.write('<span style="color:#%(colour)s">%(dt)s</span> %(msg)s<br />\n' % locals())
f.close()
def refresh():
f = open("/tmp/wall.html")
return '\n'.join(list(f)[-25:])
sajax1.sajax_init()
sajax1.sajax_export(refresh, add_line)
sajax1.sajax_handle_client_request()
 
print """
<html>
<head>
<title>PyWall</title>
<script>
"""
sajax1.sajax_show_javascript()
print """
var check_n = 0;
function refresh_cb(new_data) {
document.getElementById("wall").innerHTML = new_data;
document.getElementById("status").innerHTML = "Checked #" + check_n++;
setTimeout("refresh()", 1000);
}
function refresh() {
document.getElementById("status").innerHTML = "Checking..";
x_refresh(refresh_cb);
}
function add_cb() {
// we don't care..
}
 
function add() {
var line;
var handle;
handle = document.getElementById("handle").value;
line = document.getElementById("line").value;
if (line == "")
return;
x_add_line("[" + handle + "] " + line, add_cb);
document.getElementById("line").value = "";
}
</script>
</head>
<body onload="refresh();">
 
<a href="http://">Sajax</a> - Wall Example<br/>
<input type="text" name="handle" id="handle" value="(name)"
onfocus="this.select()" style="width:130px;">
<input type="text" name="line" id="line" value="(enter your message here)"
onfocus="this.select()"
style="width:300px;">
<input type="button" name="check" value="Post message"
onclick="add(); return false;">
<div id="wall"></div>
<div id="status"><em>Loading..</em></div>
</body>
</html>
""" % locals()
Property changes:
Added: svn:mime-type
+text/x-python
\ No newline at end of property
/trunk/dependencies/sajax/ruby/Readme.txt
0,0 → 1,9
SAJAX RUBY BACKEND
------------------
 
Contributed and put into the public domain by an anonymous member
of the Sajax forum. If anyone wants to take control of this port
and improve it, it would be welcomed.
 
 
 
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/trunk/dependencies/sajax/ruby/Sajax.rb
Cannot display: file marked as a binary type.
svn:mime-type = application/x-ruby
Property changes:
Added: svn:mime-type
+application/x-ruby
\ No newline at end of property