Changeset 1161

Show
Ignore:
Timestamp:
12/18/07 18:03:21 (1 year ago)
Author:
mikey
Message:

added missing doc comments
fixed coding style issues

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/org/stubbles/examples/resources/MyResource.php

    r904 r1161  
    11<?php 
    2 interface MyResource extends stubSessionResource { 
     2/** 
     3 * Example resource interface. 
     4 * 
     5 * @author      Stephan Schmidt <schst@stubbles.net> 
     6 * @package     stubbles_examples 
     7 * @subpackage  resources 
     8 */ 
     9stubClassLoader::load('net.stubbles.ipo.session.resourcemanager.stubSessionResource'); 
     10/** 
     11 * Example resource interface. 
     12 * 
     13 * @package     stubbles_examples 
     14 * @subpackage  resources 
     15 */ 
     16interface MyResource extends stubSessionResource 
     17
     18    /** 
     19     * returns the current count value 
     20     * 
     21     * @return  int 
     22     */ 
    323    public function getCount(); 
     24 
     25    /** 
     26     * increments the counter 
     27     */ 
    428    public function incrementCount(); 
    529} 
  • trunk/src/main/php/org/stubbles/examples/resources/MyResourceImpl.php

    r1156 r1161  
    11<?php 
    2 stubClassLoader::load('org.stubbles.examples.resources.MyResource'); 
    3  
    4 class MyResourceImpl extends stubSerializableObject implements MyResource { 
    5  
     2/** 
     3 * Example resource implementation. 
     4 * 
     5 * @author      Stephan Schmidt <schst@stubbles.net> 
     6 * @package     stubbles_examples 
     7 * @subpackage  resources 
     8 */ 
     9stubClassLoader::load('net.stubbles.ipo.session.resourcemanager.stubSessionResource'); 
     10/** 
     11 * Example resource implementation. 
     12 * 
     13 * @package     stubbles_examples 
     14 * @subpackage  resources 
     15 */ 
     16class MyResourceImpl extends stubSerializableObject implements MyResource 
     17
     18    /** 
     19     * the counter 
     20     * 
     21     * @var  int 
     22     */ 
    623    protected $count; 
    724 
    8     public function __construct() { 
     25    /** 
     26     * constructor 
     27     */ 
     28    public function __construct() 
     29    { 
    930        $this->count = 0; 
    1031    } 
    1132 
    1233    /** 
    13      * get the current count value 
     34     * returns the current count value 
    1435     * 
    15      * @return int 
     36     * @return int 
    1637     * @XMLTag(tagName='count') 
    1738     */ 
    18     public function getCount() { 
     39    public function getCount() 
     40    { 
    1941        return $this->count; 
    2042    } 
    2143 
    2244    /** 
    23      * Increment the count 
     45     * increments the counter 
    2446     * 
    2547     * @XMLIgnore 
    2648     */ 
    27     public function incrementCount() { 
     49    public function incrementCount() 
     50    { 
    2851        $this->count++; 
    2952    } 
  • trunk/src/main/php/org/stubbles/examples/service/MathService.php

    r751 r1161  
    1414 * @subpackage  service 
    1515 */ 
    16 class MathService { 
    17  
     16class MathService 
     17
    1818    /** 
    1919     * Add two numbers 
    2020     * 
    2121     * @WebMethod 
    22      * @param int $arrKey 
    23      * @return string 
     22     * @param   int    $arrKey 
     23     * @return string 
    2424     */ 
    25     public function add($a, $b) { 
    26         return $a+$b; 
     25    public function add($a, $b) 
     26    { 
     27        return $a + $b; 
    2728    } 
    2829 
     
    3233     * @WebMethod 
    3334     */ 
    34     public function throwException() { 
     35    public function throwException() 
     36    { 
    3537        throw new stubException("This exception is intended."); 
    3638    } 
  • trunk/src/main/php/org/stubbles/examples/service/RememberNameService.php

    r844 r1161  
    77 * @subpackage  service 
    88 */ 
    9  
    109/** 
    1110 * Simple service to demonstrate stateful services. 
     
    1514 * @subpackage  service 
    1615 */ 
    17 class RememberNameService { 
    18  
     16class RememberNameService 
     17
     18    /** 
     19     * session key 
     20     */ 
    1921    const SESSION_KEY_NAME = '__name__'; 
    20  
    2122    /** 
    2223     * The session 
    2324     * 
    24      * @var stubSession 
     25     * @var stubSession 
    2526     */ 
    2627    private $session; 
     
    2930     * Inject the session 
    3031     * 
    31      * @param stubSession $session 
     32     * @param stubSession $session 
    3233     * @Inject 
    3334     */ 
    34     public function setSession(stubSession $session) { 
     35    public function setSession(stubSession $session) 
     36    { 
    3537        $this->session = $session; 
    3638    } 
     
    4042     * 
    4143     * @WebMethod 
    42      * @return string 
     44     * @return string 
    4345     */ 
    44     public function getName() { 
     46    public function getName() 
     47    { 
    4548        return $this->session->getValue(self::SESSION_KEY_NAME, 'No name set.'); 
    4649    } 
     
    5053     * 
    5154     * @WebMethod 
    52      * @param string 
     55     * @param string 
    5356     */ 
    54     public function setName($name) { 
     57    public function setName($name) 
     58    { 
    5559        return $this->session->putValue(self::SESSION_KEY_NAME, $name); 
    5660    }