[puntoengine] r91 committed - New Object class to base object of puntoengine

0 views
Skip to first unread message

punto...@googlecode.com

unread,
Oct 30, 2011, 5:46:31 PM10/30/11
to punto...@googlegroups.com
Revision: 91
Author: jba...@gmail.com
Date: Sun Oct 30 14:45:40 2011
Log: New Object class to base object of puntoengine
http://code.google.com/p/puntoengine/source/detail?r=91

Added:
/trunk/puntoengine/core/Object.php

=======================================
--- /dev/null
+++ /trunk/puntoengine/core/Object.php Sun Oct 30 14:45:40 2011
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Source code of Object class
+ * @category puntoengine
+ * @package core
+ * @author Juan Benavides Romero <juan.benav...@gmail.com>
+ * @since 0.4.0
+ */
+
+
+/**
+ * Object is a base class of all class of engine and
+ * @category puntoengine
+ * @package servlets
+ * @author Juan Benavides Romero <juan.benav...@gmail.com>
+ * @since 0.4.0
+ */
+class Object {
+ /**
+ * Override undefined call to a method
+ * @param string $name Name of undefined method
+ * @param array $arguments Params of the method
+ * @since 0.4.0
+ */
+ public function __call($name, $arguments) {
+ }//__call
+
+
+
+ /**
+ * Override undefined set property
+ * @param string $name Property name
+ * @param mixed $value Value to set
+ * @since 0.4.0
+ */
+ public function __set($name, $value) {
+ }//__set
+
+
+ /**
+ * Override the get property
+ * @param string $name Property name
+ * @return null
+ * @since 0.4.0
+ */
+ public function __get($name) {
+ return null;
+ }//__get
+
+
+
+ /**
+ * Override the isset function are called againt property of the class
+ * @param string $name Property name
+ * @return bool
+ * @since 0.4.0
+ */
+ public function __isset($name) {
+ return false;
+ }//__isset
+
+
+
+ /**
+ * Override the unset function are called againt property of the class
+ * @param string $name Property name
+ * @since 0.4.0
+ */
+ public function __unset($name) {
+ }//__unset
+
+
+
+ /**
+ * Render the class to a json encoding
+ * @return string
+ * @since 0.4.0
+ */
+ public function toJson() {
+ return json_encode($this);
+ }//toJson
+
+
+ /**
+ * Render the class to a string encoding
+ * @return type
+ * @since 0.4.0
+ */
+ public function toString() {
+ return $this->__toString();
+ }//toString
+
+
+
+ /**
+ * Render the class to a xml encoding
+ * @throws NotImplementedException
+ * @since 0.4.0
+ */
+ public function toXml() {
+ throw new NotImplementedException(__CLASS__ . '::' . __METHOD__);
+ }//toXml
+}//Object
+?>

Reply all
Reply to author
Forward
0 new messages