<?php
/**
 * MyClass file
 *
 * <code>
 * using('System.MyClass');
 * </code>
 * @name MyClass
 * @package MyClass
 * @date 22.03.2007
 * @author Margo Poolak <margo 'dot' poolak 'at' mail 'dot' ee>
 * @copyright Copyright &copy;2007 Diara OÜ. All Rights Reserved.
 * @internal This class is invented to do something for me
 * @see CtrlApplication

 * @example C:\Program Files\xampp\htdocs\ctrl\MyClass.php Kuva faili sisu näidis
 */
/**
* MyClass class
*
* This is my own invented class
* <code>
* <?php
* // Can use as follows
* $my_class = new MyClass();
* echo $my_class->Hello('John');// will output "Hello John"
* echo $my_class->Goodbye();// will output "Goodbye John"
* echo $my_class->Goodbye('Willy'); // will output "Goodbye Willy"
* ?>
* </code>
*
* @name MyClass
* @package MyClass
* @version 1.0
*/ 
class DocumentedClass
{
	/**
	* @var string to save name
	*/	
	public $name;
	/**
	* @var string
	* @access private
	*/	
	private $_name;
	/**
	* @var string to save word
	* @access protected
	*/	
	protected $__word;
	
	/**
	* Say Hello to someone
	* This will say Hello to someone and will save his name
	* @param string $name
	* @return string Hello $name
	*/
	public function Hello($name)
	{
		$this->$_name = $name;
		return "Hello $name";
	}
	/**
	* Say Goodby to someone
	* This will say Goodby to someone \nIf the name not input then will say to the saved name
	* @param string $name
	* @return string Goodbye $name
	*/
	public function Goodbye($name='')
	{
		if(!!($name))
		{
			return "Goodbye $name";
		}
		return "Goodbye $this->_name";
	}
	/**
	* What user says
	* You can save the word to say
	* @param string word
	* @access protected
	*/
	protected function Say($word)
	{
		$this->__word = $word;
	}
}
?>