PHP 클래스 Prado\Web\Services\TJsonService
TJsonService manages a set of {@link TJsonResponse}, each
representing specific response with javascript content.
The service parameter, referring to the ID of the service, specifies
which javascript content to be provided to end-users.
To use TJsonService, configure it in application configuration as follows,
where each JSON response is specified via a <json> element.
Initial property values can be configured in a <json> element.
PHP configuration style:
'services' => array(
'get_article' => array(
'class' => 'Path.To.JsonResponseClass1',
'properties' => array(
...
)
)
)
To retrieve the JSON content provided by "get_article", use the URL
index.php?json=get_article
파일 보기
프로젝트 열기: pradosoft/prado
공개 메소드들
메소드 |
설명 |
|
init ( $xml ) |
Initializes this module. |
|
run ( ) |
Runs the service. |
|
보호된 메소드들
메소드 |
설명 |
|
createJsonResponse ( $service, $properties, $config ) |
Renders content provided by TJsonResponse::getJsonContent() as
javascript in JSON format. |
|
loadJsonServices ( $config ) |
Load the service definitions. |
|
메소드 상세
createJsonResponse()
보호된 메소드
Renders content provided by TJsonResponse::getJsonContent() as
javascript in JSON format.
This method is required by the IModule interface.
loadJsonServices()
보호된 메소드
Load the service definitions.
This method is invoked by application automatically.