System.Web.Services.AJAX
[ class tree: System.Web.Services.AJAX ] [ index: System.Web.Services.AJAX ] [ all elements ]

Class: TAjaxClient

Source Location: /Web/Services/AJAX/TRemoteObjectServer.php

Class Overview


AJAX client script render.

Class Details

[line 233]
AJAX client script render.

Renders javascript for AJAX remote objects on-the-fly. Cache headers are sent if the javascript has not been modified.




abstract:  
version:  $Revision: 1.1 $ $Date: 2005/11/06 23:02:35 $
author:  Wei Zhuo<weizhuo[at]gmail[dot]com>


[ Top ]

Methods


Child classes:

TAjaxStubClient
AJAX Remote Object client stub render.

Class Methods


method compareEtags [line 256]

boolean compareEtags( string $serverETag)

Determine if the given cache identifiers matches with that from the browser client. If match, send not-modified cache header.



return:  true if matches with client cache ID, false otherwise.
access:  protected


Parameters:

string   $serverETag   cache indentifier to match

[ Top ]

method getCacheETag [line 245]

string getCacheETag( TAJAXClassInfo[] $objects)

Get the cache identifier, a MD5 of the handlers and request URI.



return:  cache identifier.
access:  protected


Parameters:

TAJAXClassInfo[]   $objects   list of class info

[ Top ]

method render [line 238]

void render( )

Render the client-side javascript.



abstract:  
access:  public


Overridden in child classes as:

TAjaxStubClient::render()
Renders the javascript client. Checks the client-side cache id, render if the cache id differ from the current cache id.

[ Top ]

method sendCacheHeaders [line 275]

void sendCacheHeaders( string $etag, boolean $notModified)

Sends cache headers with cache identifier.



access:  protected


Parameters:

string   $etag   cache identifier.
boolean   $notModified   if not modifier, send 304 header.

[ Top ]

method sendJsHeader [line 287]

void sendJsHeader( [int $length = 0])

Sends the javascript header, i.e. content-length, and content-type.



access:  protected


Parameters:

int   $length   javascript content length.

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.