Return a defined thing or an empty object (Metrodi_Proto)
@return object  defined thing or empty object (Metrodi_Proto)
5234
public function & make($thing, $singleton=TRUE) {
		if (!isset($this->thingList[$thing])) {
			$this->thingList[$thing] = $thing;
		}

		//closures and anon funcs are objects of type/class Closure
		if (is_object($this->thingList[$thing]) && !is_callable($this->thingList[$thing])) {
			return $this->thingList[$thing];
		}

		$args = func_get_args();
		array_shift($args);
		array_shift($args);

		if (!count($args) && isset($this->thingArgList[$thing])) {
			$args = $this->thingArgList[$thing];
		}
		if (!count($args)) {
			$args = NULL;
		}
		if ($singleton) {
			if (!@count($args)) {
				$args = NULL;
				$cachekey = $thing;
			} else {
				$cachekey = $thing.':'.sha1(serialize($args));
			}

			if ( $singleton && isset($this->objectCache[$cachekey]) ) {
				return $this->objectCache[$cachekey];
			}
		}

		$result = NULL;
		if (is_callable($this->thingList[$thing])) {
			if ($args === NULL) {
				$result = $this->thingList[$thing]->__invoke();
			} else {
				$result = call_user_func_array( array($this->thingList[$thing], '__invoke'), $args);
			}
		}

		//TODO: refactor into file loading, class loading, and invokables

		//this should be a filename that resolves to a classname
		$file = $this->thingList[$thing];
		if (!$result) {
			if ($singleton) {
				$result = $this->loadAndCache($file, $cachekey, $args);
			} else {
				//always make new object when not $singleton
				$result = $this->load($file, $args);
			}
		}
		//we got FALSE from load or loadAndCache
		if (!$result) {
			$result = new Metrodi_Proto($thing);
		}

		if ($singleton && !isset($this->objectCache[$cachekey])) {
			$this->objectCache[$cachekey] = $result;
		}
		return $result;
	}
286095
function proto($new = null, $return_entity = false)
    {
        if (isset($new)){
            if ($new instanceof Entity){
                $this->_proto = $new;
                $new = $new->uri();
            }else{
                $this->_proto = null; // for reloading
            }
            if ($new != $this->_attributes['proto']){
                $this->change('proto', $new);
            }
        }
        if ($return_entity){
            if (!isset($this->_proto)){
                if (isset($this->_attributes['proto'])){
                    $this->_proto = Data::read($this->_attributes['proto']);
                }else{
                    $this->_proto = false;
                }
            }
            return $this->_proto;
        }
        return $this->_attributes['proto'];
    }
399054
public function peek() {
        if (null === $this->stack) return null;
        if ($this->isEmpty()) return null;

        $value = $this->stack[$this->size];
        return $value;
    }
29397
public function get()
    {
        $queryset = $this->_filterOrExclude(
            false,
            static::formatConditions(__METHOD__, func_get_args())
        );

        $resultCount = count($queryset);

        if (1 == $resultCount) {
            return $queryset->getResults()[0];
        } elseif (!$resultCount) {
            throw new ObjectDoesNotExist(
                sprintf(
                    '%s matching query does not exist.',
                    $this->model->getMeta()->getNSModelName()
                )
            );
        }

        throw new MultipleObjectsReturned(
            sprintf(
                '"get() returned more than one %s -- it returned %s!"',
                $this->model->getMeta()->getNSModelName(),
                $resultCount
            )
        );
    }
1055794
function() {
    var target = arguments[0];
    var type = lib.type.typeOf(target);
    if (type === "object") {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        var srctype = lib.type.typeOf(source);
        if (srctype === "object") {
          var keys = Object.keys(source);
          var len = keys.length;
          for (var a = 0; a < len; a++) {
            var key = keys[a];
            target[key] = source[key];
          }
        }
      }
    } else if (type == "function") {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        var srctype = lib.type.typeOf(source);
        if (srctype === "object") {
          var keys = Object.keys(source);
          var len = keys.length;
          for (var a = 0; a < len; a++) {
            var key = keys[a];
            target.prototype[key] = lib.method.createMethod(source[key]);
          }
        }
      }
    }
    return target;
  }
431304
def get_object(offset)
      io = to_shm_io
      io.seek(offset)
      Marshal.load(io)
    end
934505
public function getFrontEndDataObject()
    {
        $obj = null;
        $ba = $this->BaseAction();

        if ($ba->hasMethod('getFrontEndDataObject')) {
            $obj = $ba->getFrontEndDataObject();
        } else {
            $obj = $this->Workflow()->getTarget();
        }

        return $obj;
    }
1042523
private function objectProperty() {
    if ($this->currentType === T_STRING) {
      return $this->mustMatchToken(T_STRING);
    }
    elseif ($this->currentType === '{') {
      return $this->bracesExpr();
    }
    else {
      return $this->indirectReference();
    }
  }
668927
function () {
    function impl (element) {
      customElement.call(this, element)
    }
    impl.prototype = Object.create(customElement.prototype)
    return impl
  }
888349
public function toArray()
   {
      $proto = Converter::toArray($this);
      $not = array('primary_method', 'lastUpdate', 'subfunctions', 'client', 'path', 'hasPath');
      // we only need key value
      foreach ($proto as $k => $p) {
        if (in_array($k, $not)) {
          unset($proto[$k]);
        }
      }

      return $proto;
   }
100017
function getItem()
    {
        $sourceObject = $this->sourceObject;
        if ($this->value !== null) {
            $item = $sourceObject::get()->byID($this->value);
        } else {
            $item = $sourceObject::create();
        }
        return $item;
    }
233331
function lookupDescriptor(proto, key) {
		if (proto.hasOwnProperty(key)) {
			return Object.getOwnPropertyDescriptor(proto, key);
		} else if ((proto = Object.getPrototypeOf(proto))) {
			return lookupDescriptor(proto, key);
		} else {
			return null;
		}
	}
998485
function isPlainObject(obj/*: any*/) /*: boolean*/ {
    if (typeof obj !== 'object') return false;
    const proto = Object.getPrototypeOf(obj);
    return (proto === null) || (
        proto
        && proto.constructor === Object
        && proto.constructor instanceof proto.constructor
    );
}
90981
function empty (args) {
    // make sure args is object
    args = requireValidOptionalObject(args)
    // to empty object data must be set to null
    args.data = null
    // use update method to empty
    return this.updateMeta(args)
}
654636
function createMipElementProto (name) {
  let proto = Object.create(createBaseElementProto())
  proto.name = name
  return proto
}
476658
function openObject() {
		//Helpers::dompdf_debug("trace", "Enter My_TCPDF.openObject(state = $this->state)");

		if ($this->state == 2) {
			$curr_buffer = $this->getPageBuffer($this->page);
		}
		else {
			$curr_buffer = $this->getBuffer();
		}

		$this->dompdf_num_stack++;
		$this->dompdf_stack[$this->dompdf_num_stack] = array('c' => $curr_buffer, 'p' => $this->page, 'g' => $this->getGraphicVars());

		//Helpers::dompdf_debug("trace", "---------> " . $curr_buffer);

		if ($this->state == 2) {
			$this->setPageBuffer($this->page, '');
		}
		else {
			$this->buffer = '';
			$this->bufferlen = strlen($this->buffer);
		}
		$this->page = 1;	// some output is not done if page = 0 (e.g SetDrawColor())

		$this->dompdf_num_objects++;
		$this->dompdf_objects[$this->dompdf_num_objects] = array('c' => '', 'p' => 0, 'g' => null);

		return $this->dompdf_num_objects;
	}
227232
def get(self, object_name):
        
        if object_name in self:
            return Object(obj=self.container.get_object(object_name))
        return None