1<?php
2
3/*
4	This file is part of ActiveLink PHP DOC Package (www.active-link.com).
5	Copyright (c) 2002-2004 by Zurab Davitiani
6
7	You can contact the author of this software via E-mail at
8	hattrick@mailcan.com
9
10	ActiveLink PHP DOC Package is free software; you can redistribute it and/or modify
11	it under the terms of the GNU Lesser General Public License as published by
12	the Free Software Foundation; either version 2.1 of the License, or
13	(at your option) any later version.
14
15	ActiveLink PHP DOC Package is distributed in the hope that it will be useful,
16	but WITHOUT ANY WARRANTY; without even the implied warranty of
17	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18	GNU Lesser General Public License for more details.
19
20	You should have received a copy of the GNU Lesser General Public License
21	along with ActiveLink PHP DOC Package; if not, write to the Free Software
22	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23*/
24
25/**
26  *	Method class complements PHPClass and is used to define a class method
27  *	@class		Method
28  *	@package	org.active-link.doc
29  *	@author		Zurab Davitiani
30  *	@version	0.3.4
31  *	@see		PHPClass
32  */
33
34class Method {
35
36	var $params;
37	var $info;
38
39	/**
40	  *	Constructor, runs when new object instance is created, sets name of the method
41	  *	@method		Method
42	  *	@param		string name
43	  */
44	function Method($name) {
45		$this->info = array();
46		$this->params = array();
47		$this->setInfo("name", $name);
48	}
49
50	/**
51	  *	Returns value of a property by name
52	  *	@method		getInfo
53	  *	@param		string name
54	  *	@returns	string value of a property if found, false otherwise
55	  */
56    function getInfo($name) {
57		if(array_key_exists($name, $this->info))
58			return $this->info[$name];
59		else
60			return false;
61	}
62
63	/**
64	  *	Sets a property with supplied name to a supplied value
65	  *	@method		setInfo
66	  *	@param		string name, string value
67	  *	@returns	none
68	  */
69	function setInfo($name, $value) {
70		$this->info[$name] = $value;
71	}
72
73	/**
74	  *	Sets a parameter with supplied name and value
75	  *	@method		setParam
76	  *	@param		string name, string value
77	  *	@returns	none
78	  */
79	function setParam($name, $value) {
80		$this->params[$name] = $value;
81	}
82
83}
84