Delete handler
@param  object $obj
@return void
15303
private function delete($obj) {

		$sync = (!empty(config('firebase')))
				 ? config('firebase.sync')
				 : config('database.connections.firebase.sync');	// `sync` by Default (config)?
		$path = strtolower(get_class($obj)).'s';					// plural collection name
		$id   = \Firebase::getId($obj);								// object ID (extracted)

		// Delete if Allowed
		if ($sync !== false || !empty($obj->firebase)) {
			\Firebase::delete('/'.$path.'/'.$id);
		}
	}
245480
public function delete($id)
    {
        $delete = Statement::get(
            'DELETE_OBJECT_INDEX',
            [
                '@collection' => $this->_name,
                '@id' => $this->_connector->quote($id)
            ]
        );
        $delete .= Statement::get(
            'DELETE_OBJECT',
            [
                '@collection' => $this->_name,
                '@id' => $this->_connector->quote($id)
            ]
        );

        $this->_connector->exec($delete);
    }
887637
def _deleter(self, obj):
        
        if self._fdel_ is not None:
            self._fdel_(obj)

        else:
            delattr(obj, self._attrname())

        # notify parent schema about value deletion.
        if isinstance(obj, Schema):
            obj._delvalue(self)
1370650
protected function clean($obj)
    {
        $methods = array();

        foreach ($this->forceArray($obj->GetMyPaymentMethodsResult->PaymentMethods->PaymentMethod) as $value) {
            array_push($methods, array(
                'PaymentMethodCode' => $value->PaymentMethodCode,
                'Description' => $value->Description,
                'Issuers' => $this->convertIssuers($this->forceArray($value->Issuers->Issuer))
                    )
            );
        };
        return $methods;
    }
661886
public function removeObject(DataObject $object)
    {
        $item = ChangeSetItem::get()->filter([
            'ObjectID' => $object->ID,
            'ObjectClass' => $object->baseClass(),
            'ChangeSetID' => $this->ID
        ])->first();

        if ($item) {
            // TODO: Handle case of implicit added item being removed.

            $item->delete();
        }

        $this->sync();
    }
860618
public function delete($dc)
	{
		$model = \ContentModel::findByPk($dc->id);
		$this->objModel = new ContentWrapper\Model($model);

		// getType will throw an exception if type is not found. use it to detect non content wrapper elements
		try {
			$type = $this->objModel->getType();
		}
		catch(\Exception $e)
		{
			return;
		}

		if($this->objModel->getType() == ContentWrapper\Model::TYPE_START)
		{
			$deleteTypes = array();

			if($this->isTrigger($this->objModel->getType(), ContentWrapper\Model::TYPE_SEPARATOR, static::TRIGGER_DELETE)) {
				$deleteTypes[] = $this->objModel->getTypeName(ContentWrapper\Model::TYPE_SEPARATOR);
			}

			if($this->isTrigger($this->objModel->getType(), ContentWrapper\Model::TYPE_STOP, static::TRIGGER_DELETE)) {
				$deleteTypes[] = $this->objModel->getTypeName(ContentWrapper\Model::TYPE_STOP);
			}

			if(!empty($deleteTypes)) {
				$this->Database
					->prepare(sprintf(
						'DELETE FROM tl_content WHERE bootstrap_parentId=? AND type IN(\'%s\')',
						implode('\',\'', $deleteTypes)
					))
					->execute($this->objModel->id);
			}
		}
		elseif($this->objModel->getType() == ContentWrapper\Model::TYPE_STOP) {
			if($this->isTrigger($this->objModel->getType(), ContentWrapper\Model::TYPE_SEPARATOR, static::TRIGGER_DELETE)) {
				$this->Database
					->prepare('DELETE FROM tl_content WHERE bootstrap_parentId=? AND type=?')
					->execute(
						$this->objModel->bootstrap_parentId,
						$this->objModel->getTypeName(ContentWrapper\Model::TYPE_SEPARATOR)
					);
			}

			if($this->isTrigger($this->objModel->getType(), ContentWrapper\Model::TYPE_START, static::TRIGGER_DELETE)) {
				$query = sprintf('DELETE FROM %s WHERE id=?', $this->objModel->getModel()->getTable());

				\Database::getInstance()
					->prepare($query)
					->execute($this->objModel->bootstrap_parentId);
			}
		}
		else {
			// todo: handle seperator delete actions
		}
	}
418304
function do_delete(self, ObjType, obj) {
	return nr_fcall("nopg:do_delete", function() {
		if(!(obj && obj.$id)) { throw new TypeError("opts.$id invalid: " + util.inspect(obj) ); }
		var query, params;
		query = "DELETE FROM " + (ObjType.meta.table) + " WHERE id = $1";
		params = [obj.$id];
		return do_query(self, query, params);
	});
}
1058539
private void doDelete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
    {
        //logger.info("DELETING " + obj);
        // object is not null
        if (obj != null)
        {
            obj = getProxyFactory().getRealObject(obj);
            /**
             * Kuali Foundation modification -- 8/24/2007
             */
            if ( obj == null ) return;
            /**
             * End of Kuali Foundation modification
             */
            /**
             * MBAIRD
             * 1. if we are marked for delete already, avoid recursing on this object
             *
             * arminw:
             * use object instead Identity object in markedForDelete List,
             * because using objects we get a better performance. I can't find
             * side-effects in doing so.
             */
            if (markedForDelete.contains(obj))
            {
                return;
            }
            
            ClassDescriptor cld = getClassDescriptor(obj.getClass());
            //BRJ: check for valid pk
            if (!serviceBrokerHelper().assertValidPkForDelete(cld, obj))
            {
                String msg = "Cannot delete object without valid PKs. " + obj;
                logger.error(msg);
                return;
            }
            
            /**
             * MBAIRD
             * 2. register object in markedForDelete map.
             */
            markedForDelete.add(obj);
            Identity oid = serviceIdentity().buildIdentity(cld, obj);

            // Invoke events on PersistenceBrokerAware instances and listeners
            BEFORE_DELETE_EVENT.setTarget(obj);
            fireBrokerEvent(BEFORE_DELETE_EVENT);
            BEFORE_DELETE_EVENT.setTarget(null);

            // now perform deletion
            performDeletion(cld, obj, oid, ignoreReferences);
 	  	 
            // Invoke events on PersistenceBrokerAware instances and listeners
            AFTER_DELETE_EVENT.setTarget(obj);
            fireBrokerEvent(AFTER_DELETE_EVENT);
            AFTER_DELETE_EVENT.setTarget(null);
 	  	 	
            // let the connection manager to execute batch
            connectionManager.executeBatchIfNecessary();
        }
    }
870758
public function unsubFromAll($obj)
    {
        foreach ($this->events as $event) {
            $event->unsub($obj);
        }
        return true;
    }
458062
function(obj) {
    if (obj) {
      for (var prop in obj) {
        if (_hasOwn.call(obj, prop)) {
          delete obj[prop];
        }
      }
    }
    return obj;
  }
1267844
protected function _lock($object, $lock)
    {
        if ($lock) {
            self::$_locks[$object->getHandle()] = true;
        } else {
            unset(self::$_locks[$object->getHandle()]);
        }
    }
1308693
public static function transform($obj)
    {
        if (is_array($obj) || is_object($obj)) {
            foreach ($obj as &$object) {
                if (isset($object->status)) {
                    self::transformObject($object);
                }

                self::transform($object);
            }
        }
    }
714333
function del (obj, key) {
  var ob = obj.__ob__;
  if (obj._isVue || (ob && ob.vmCount)) {
    process.env.NODE_ENV !== 'production' && warn(
      'Avoid deleting properties on a Vue instance or its root $data ' +
      '- just set it to null.'
    );
    return
  }
  if (!hasOwn(obj, key)) {
    return
  }
  delete obj[key];
  if (!ob) {
    return
  }
  ob.dep.notify();
}
1354438
def delete_object(self, obj):
        
        session = self.get_db_session()
        session.delete(obj)
        session.commit()
198227
public function Delete($obj)
	{
		$objectclass = get_class($obj);

		if (!$obj->OnBeforeDelete())
		{
			$this->Observe("Delete was cancelled because OnBeforeDelete did not return true");
			return 0;
		}

		$fms = $this->GetFieldMaps($objectclass);

		$pk = $obj->GetPrimaryKeyName();
		$id = $obj->$pk;
		$table = $fms[$pk]->TableName;
		$pkcol = $fms[$pk]->ColumnName;

		$sql = "delete from `$table` where `$pkcol` = '" . $this->Escape($id) . "'";
		$returnval = $this->DataAdapter->Execute($sql);

		// remove from cache
		$this->DeleteCache($objectclass,$id);

		$obj->OnDelete(); // fire OnDelete event

		return $returnval;

	}
198240
final public function deleteObject(Model $object)
    {
        if ($object->isNewRecord()) {
            return;
        }

        $this->onObjectDeleted($object);

        $this->deleteObjectFromCache($object);
    }
1024858
static function sync($obj)
    {
        if (self::exists($obj)) {

            self::drop($obj);
            self::alter($obj);

        } else {
            self::create($obj);
        }
    }