mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 04:52:14 +09:00
adds comments for phpdoc
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10771 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7d2e67c9ad
commit
8b94528a72
1 changed files with 14 additions and 14 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
* Every modules inherits from Object class. It includes error, message, and other variables for communicatin purpose.
|
* Every modules inherits from Object class. It includes error, message, and other variables for communicatin purpose.
|
||||||
*
|
*
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
**/
|
*/
|
||||||
|
|
||||||
class Object {
|
class Object {
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ class Object {
|
||||||
* @param int $error Error code
|
* @param int $error Error code
|
||||||
* @param string $message Error message
|
* @param string $message Error message
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
*/
|
||||||
function Object($error = 0, $message = 'success') {
|
function Object($error = 0, $message = 'success') {
|
||||||
$this->setError($error);
|
$this->setError($error);
|
||||||
$this->setMessage($message);
|
$this->setMessage($message);
|
||||||
|
|
@ -50,7 +50,7 @@ class Object {
|
||||||
*
|
*
|
||||||
* @param int $error error code
|
* @param int $error error code
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
*/
|
||||||
function setError($error = 0) {
|
function setError($error = 0) {
|
||||||
$this->error = $error;
|
$this->error = $error;
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +59,7 @@ class Object {
|
||||||
* Getter to retrieve error code
|
* Getter to retrieve error code
|
||||||
*
|
*
|
||||||
* @return int Returns an error code
|
* @return int Returns an error code
|
||||||
**/
|
*/
|
||||||
function getError() {
|
function getError() {
|
||||||
return $this->error;
|
return $this->error;
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +90,7 @@ class Object {
|
||||||
*
|
*
|
||||||
* @param string $message Error message
|
* @param string $message Error message
|
||||||
* @return bool Alaways returns true.
|
* @return bool Alaways returns true.
|
||||||
**/
|
*/
|
||||||
function setMessage($message = 'success') {
|
function setMessage($message = 'success') {
|
||||||
if(Context::getLang($message)) $message = Context::getLang($message);
|
if(Context::getLang($message)) $message = Context::getLang($message);
|
||||||
$this->message = $message;
|
$this->message = $message;
|
||||||
|
|
@ -103,7 +103,7 @@ class Object {
|
||||||
* Getter to retrieve an error message
|
* Getter to retrieve an error message
|
||||||
*
|
*
|
||||||
* @return string Returns message
|
* @return string Returns message
|
||||||
**/
|
*/
|
||||||
function getMessage() {
|
function getMessage() {
|
||||||
return $this->message;
|
return $this->message;
|
||||||
}
|
}
|
||||||
|
|
@ -114,7 +114,7 @@ class Object {
|
||||||
* @param string $key A variable name
|
* @param string $key A variable name
|
||||||
* @param mixed $val A value for the variable
|
* @param mixed $val A value for the variable
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
*/
|
||||||
function add($key, $val) {
|
function add($key, $val) {
|
||||||
$this->variables[$key] = $val;
|
$this->variables[$key] = $val;
|
||||||
}
|
}
|
||||||
|
|
@ -124,7 +124,7 @@ class Object {
|
||||||
*
|
*
|
||||||
* @param Object|array $object Either object or array containg key/value pairs to be added
|
* @param Object|array $object Either object or array containg key/value pairs to be added
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
*/
|
||||||
function adds($object)
|
function adds($object)
|
||||||
{
|
{
|
||||||
if(is_object($object))
|
if(is_object($object))
|
||||||
|
|
@ -143,7 +143,7 @@ class Object {
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @return string Returns value to a given key
|
* @return string Returns value to a given key
|
||||||
**/
|
*/
|
||||||
function get($key) {
|
function get($key) {
|
||||||
return $this->variables[$key];
|
return $this->variables[$key];
|
||||||
}
|
}
|
||||||
|
|
@ -153,7 +153,7 @@ class Object {
|
||||||
* Method to retrieve an object containing a key/value paris
|
* Method to retrieve an object containing a key/value paris
|
||||||
*
|
*
|
||||||
* @return Object Returns an object containing key/value pairs
|
* @return Object Returns an object containing key/value pairs
|
||||||
**/
|
*/
|
||||||
function gets() {
|
function gets() {
|
||||||
$num_args = func_num_args();
|
$num_args = func_num_args();
|
||||||
$args_list = func_get_args();
|
$args_list = func_get_args();
|
||||||
|
|
@ -168,7 +168,7 @@ class Object {
|
||||||
* Method to retrieve an array of key/value pairs
|
* Method to retrieve an array of key/value pairs
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
**/
|
*/
|
||||||
function getVariables() {
|
function getVariables() {
|
||||||
return $this->variables;
|
return $this->variables;
|
||||||
}
|
}
|
||||||
|
|
@ -177,7 +177,7 @@ class Object {
|
||||||
* Method to retrieve an object of key/value pairs
|
* Method to retrieve an object of key/value pairs
|
||||||
*
|
*
|
||||||
* @return Object
|
* @return Object
|
||||||
**/
|
*/
|
||||||
function getObjectVars() {
|
function getObjectVars() {
|
||||||
foreach($this->variables as $key => $val) $output->{$key} = $val;
|
foreach($this->variables as $key => $val) $output->{$key} = $val;
|
||||||
return $output;
|
return $output;
|
||||||
|
|
@ -187,7 +187,7 @@ class Object {
|
||||||
* Method to return either true or false depnding on the value in a 'error' variable
|
* Method to return either true or false depnding on the value in a 'error' variable
|
||||||
*
|
*
|
||||||
* @return bool Retruns true : error isn't 0 or false : otherwise.
|
* @return bool Retruns true : error isn't 0 or false : otherwise.
|
||||||
**/
|
*/
|
||||||
function toBool() {
|
function toBool() {
|
||||||
// TODO This method is misleading in that it returns true if error is 0, which should be true in boolean representation.
|
// TODO This method is misleading in that it returns true if error is 0, which should be true in boolean representation.
|
||||||
return $this->error==0?true:false;
|
return $this->error==0?true:false;
|
||||||
|
|
@ -198,7 +198,7 @@ class Object {
|
||||||
* Method to return either true or false depnding on the value in a 'error' variable
|
* Method to return either true or false depnding on the value in a 'error' variable
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
**/
|
*/
|
||||||
function toBoolean() {
|
function toBoolean() {
|
||||||
return $this->toBool();
|
return $this->toBool();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue