PHP Classes

File: tests/src/response/TestDatabag.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   tests/src/response/TestDatabag.php   Download  
File: tests/src/response/TestDatabag.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change:
Date: 4 months ago
Size: 602 bytes
 

Contents

Class file image Download
<?php

use Jaxon\App\FuncComponent;

class
TestDatabag extends FuncComponent
{
    public function
getValue()
    {
       
$sValue = $this->response->bag('dataset')->get('key', 'Default value');
       
$this->response->html('div-id', $sValue);
    }

    public function
setValue()
    {
       
$this->response->bag('dataset')->set('key', 'value');
    }

    public function
updateValue()
    {
       
$this->response->bag('dataset')->set('key2', 'value2');
       
$sValue = $this->response->bag('dataset')->get('key1', 'Default value');
       
$this->response->html('div-id', $sValue);
    }
}