AJAX
[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Class: HTML_AJAX

Source Location: /HTML_AJAX-0.1.0/AJAX.php

Class Overview


OO AJAX Implementation for PHP


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 Joshua Eichorn

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 16]
OO AJAX Implementation for PHP
  • Author: Joshua Eichorn <josh@bluga.net>
  • Version: Release: @package_version@
  • Copyright: 2005 Joshua Eichorn
  • Link: http://pear.php.net/package/PackageName
  • Todo: Decide if its good thing to support get
  • Todo: pass server side warnings to the client as exceptions or something like that
  • Todo: Add some sort of debugging console
  • License: PHP License 3.0


[ Top ]


Class Variables

$contentTypeMap = array(
            'JSON'  => 'application/json',
            'Null'  => 'text/plain',
            'Error' => 'application/error',
        )

[line 53]

Content-type map

Used in to automatically choose serializers as needed


Type:   mixed


[ Top ]

$serializer =  "JSON"

[line 40]

What encoding your going to use for serializing data from php being sent to javascript
  • Var: JSON|null

Type:   string


[ Top ]

$serverUrl =  false

[line 34]

Set the server url in the generated stubs to this value

If set to false, serverUrl will not be set


Type:   false|string


[ Top ]

$unserializer =  "JSON"

[line 46]

What encoding your going to use for unserializing data sent from javascript
  • Var: JSON|null

Type:   string


[ Top ]



Method Detail

generateClassStub   [line 121]

void generateClassStub( string $name)

Return the stub for a class

Parameters:

string   $name   — 

[ Top ]

generateJavaScriptClient   [line 107]

void generateJavaScriptClient( )

Generate the client Javascript code

[ Top ]

handleRequest   [line 166]

void handleRequest( )

  • Todo: move the get _GET check someplace else so get variabled dispatch isn't the hardcoded method
  • Todo: is it worth it to figure out howto use just 1 instance if the type is the same for serialize and unserialize

[ Top ]

registerClass   [line 66]

void registerClass( &$instance, [string|bool $exportedName = false], [array|bool $exportedMethods = false], object $instance)

Set a class to handle requests

Parameters:

object   $instance   — 
string|bool   $exportedName   —  Name used for the javascript class, if false the name of the php class is used
array|bool   $exportedMethods   —  If false all functions without a _ prefix are exported, if an array only the methods listed in the array are exported
   &$instance   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:16:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.