Faz o delete no banco do objeto especificado, se caso a opção execute_queries
estiver habilitada

@return   mixed
@internal param $ <T> $obj
@internal param null $infos
541481
public function delete()
    {
        $this->sql = new PhiberQueryWriter("delete", [
            "table"  => $this->table,
            "where"  => isset($this->infosMergeds['where']) ?
                $this->infosMergeds['where'] :
                null,
            "limit"  => isset($this->infosMergeds['limit']) ?
                $this->infosMergeds['limit'] :
                null,
            "offset" => isset($this->infosMergeds['offset']) ?
                $this->infosMergeds['offset'] :
                null
        ]);

        if ($this->phiberConfig->verifyExecuteQueries()) {

            $this->PDO = $this->PDO->prepare($this->sql);
            
            if (isset($this->infosMergeds['fields_and_values'])) {

                while (current($this->infosMergeds['fields_and_values'])) {
                    $this->PDO->bindValue(
                        "condition_" . key($this->infosMergeds['fields_and_values']),
                        $this->infosMergeds['fields_and_values'][key($this->infosMergeds['fields_and_values'])]
                    );

                    next($this->infosMergeds['fields_and_values']);
                }
            }
            if ($this->PDO->execute()) {
                return true;
            }
        }

        return false;
    }
631499
protected function resolve($obj)
	{
		if(Trunk::has($obj->id, $obj->type))
		{
			return $data = Trunk::get($obj->id, $obj->type);
		}

		return $obj;
	}
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;
    }
154493
public function CompareTo( $obj )
	{
		if ( ! $obj instanceof UntypedAtomic )
		{
			throw new \lyquidity\xml\exceptions\ArgumentNullException( "$obj" );
		}

		/**
		 * @var UntypedAtomic $src
		 */
		$src = $obj;
		return strcmp( $this->Value, $src->Value );
	}
36293
public function delete(string $from, $wheres, array $options = [])
    {
        if (!$wheres) {
            throw new \InvalidArgumentException('Safety considerations, where conditions can not be empty');
        }

        list($where, $bindings) = DBHelper::handleConditions($wheres, $this);

        $options['from'] = $this->qn($from);
        $options['where'] = $where;

        $statement = $this->compileDelete($options);

        if (isset($options['returnSql'])) {
            return [$statement, $bindings];
        }

        return $this->fetchAffected($statement, $bindings);
    }
522605
public function delete($object)
    {
        $entityName = get_class($object);
        $repo = $this->getRepository($entityName);

        return $repo->delete($object);
    }
263587
public function compareTo($obj) {
		
		if(!($obj instanceof static)){
			throw new \InvalidArgumentException('$obj is not a comparable instance');
		}
		
		$coll = new \Collator('');
		
		return $coll->compare($this->_Value, $obj->_Value);
		
	}
974732
public function assign($obj, ...$args)
    {
        if(is_object($obj)){
            foreach($args as &$source){
                if (!isset($source)) continue;

                if ( !is_object($source) ) {
                    throw new \Exception($source . 'must be object');
                }
                foreach($source as $key=>&$val){
                    $obj->{$key} = $source->{$key};
                }
            }
        }else{
            throw new \Exception("Utlis::assign() parameter 1 by not object");
        }

        return $obj;
    }
1335135
public function delete($table, $statements, $where)
    {
        $query = 'DELETE FROM `' . $table . '` ';

        $query .= (! is_null($where)) ? ' WHERE ' : '';

        $query .= (is_string($where)) ? $where . ' ' : '';

        if (is_array($where)) {
            foreach ($where as $clause) {
                $query .= $clause . ' AND ';
            }

            $query = rtrim(trim($query), 'AND');
        }

        if (! is_null($statements) && is_array($statements)) {
            return $this->statements($query, $statements);
        }

        return $this->query($query, 'INSERT');
    }
1087920
protected function deleteFromDB($ids=null)
    {

        $query = "DELETE FROM {$this->quotedTable}";

        if ($ids == null) {
            $this->connection->write($query, [], false);
            return;
        }

        $query .= " WHERE {$this->quotedIdKey} IN ";

        $quotedIds = array_map(function ($id) {
            return $this->dialect->quote($id, 'string');
        },(array)$ids);

        $this->connection->write($query . "\n(" . implode(',', $quotedIds) . ')', [], false);

    }
428303
public function indexObject($object, $signalInformation = null, Client $client = null)
    {
        $type = $this->getIndexTypeForObject($object, $client);
        if ($type === null) {
            return null;
        }
        $data = $this->getIndexablePropertiesAndValuesFromObject($object);

        $id = $this->persistenceManager->getIdentifierByObject($object);
        $document = new Document($type, $data, $id);
        $document->store();
    }
1100390
public static function create($obj)
    {
        $nomeTabela        = FuncoesReflections::pegaNomeClasseObjeto($obj);
        $atributosTabela   = FuncoesReflections::pegaAtributosDoObjeto($obj);
        $annotationsTabela = Annotations::getAnnotation($obj);
        $arrFormatado      = [];
        $stringSql = "C" . "REATE TABLE IF NOT EXISTS `" . strtolower($nomeTabela) . "` (";

        for ($i = 0; $i < count($atributosTabela); $i++) {

            $stringSql .= $atributosTabela[$i] . " ";
            for ($j = 0; $j < count($annotationsTabela[$atributosTabela[$i]]); $j++) {

                $arrAtual = explode("=", $annotationsTabela[$atributosTabela[$i]][$j]);
                for ($k = 0; $k < count($arrAtual) - 1; $k++) {
                    $arrFormatado[FuncoesString::substituiOcorrenciasDeUmaString($arrAtual[$k], "@_", "")] = $arrAtual[$k + 1];
                }
            }
            if (array_key_exists('type', $arrFormatado)) {
                $stringSql .= " " . $arrFormatado['type'] . "";

            } else {
                $stringSql .= "";
            }

            if (array_key_exists('size', $arrFormatado)) {
                if ($arrFormatado['size'] != 'none') {
                    $stringSql .= "(" . $arrFormatado['size'] . ") ";
                }

            } else {
                $stringSql .= "";
            }

            /**
             * @todo NOT NULL AQUI
             */

            if (array_key_exists('notNull', $arrFormatado)) {
                if ($arrFormatado['notNull'] === "true") {
                    $stringSql .= " NOT NULL ";
                } else {
                    $stringSql .= "";
                };
            } else {
                $stringSql .= "";
            }

            if (array_key_exists('primaryKey', $arrFormatado)) {
                if ($arrFormatado['primaryKey'] === "true") {
                    $stringSql .= " PRIMARY KEY ";
                } else {
                    $stringSql .= "";
                };
            } else {
                $stringSql .= "";
            }

            if (array_key_exists('autoIncrement', $arrFormatado)) {
                if ($arrFormatado['autoIncrement'] === "true") {
                    $stringSql .= " AUTO_INCREMENT ";
                } else {
                    $stringSql .= "";
                };
            } else {
                $stringSql .= "";
            }

            if ($i != count($atributosTabela) - 1) {

                $stringSql .= " , ";
            }
        }

        $stringSql .= ") ENGINE = InnoDB;";
        
        echo $stringSql;
        if (JsonReader::read(BASE_DIR . "/phiber_config.json")->phiber->code_sync == 1 ? true : false) {
            $pdo = self::getConnection()->prepare($stringSql);
            if ($pdo->execute()) {
                return true;
            };
        } else {
            return $stringSql;
        }
        
        return false;
    }
125028
public function update($object)
    {
        $id = $object->getId();

        $db = new DatabaseManager();
        $connection = $db->getDbh();

        $objectAsArrayForSqlInsert = DatatbaseUtility::objectToArrayLessId($object);
        $fields = array_keys($objectAsArrayForSqlInsert);
        $updateFieldList = DatatbaseUtility::fieldListToUpdateString($fields);

        $sql = 'UPDATE :table SET :updateFieldList WHERE id=:id';
        $sql = str_replace(':table', $this->tableName, $sql);
        $sql = str_replace(':updateFieldList', $updateFieldList, $sql);

        $statement = $connection->prepare($sql);

        // add 'id' to parameters array
        $objectAsArrayForSqlInsert['id'] = $id;

        $queryWasSuccessful = $statement->execute($objectAsArrayForSqlInsert);

        return $queryWasSuccessful;
    }
118690
protected function cleanupObj($obj, $isMetaData)
    {
        if (is_null($obj)) {
            return;
        }

        if (is_array($obj)) {
            $clean = [];

            foreach ($obj as $key => $value) {
                $clean[$key] = $this->shouldFilter($key, $isMetaData) ? '[FILTERED]' : $this->cleanupObj($value, $isMetaData);
            }

            return $clean;
        }

        if (is_string($obj)) {
            return (function_exists('mb_detect_encoding') && !mb_detect_encoding($obj, 'UTF-8', true)) ? utf8_encode($obj) : $obj;
        }

        if (is_object($obj)) {
            return $this->cleanupObj(json_decode(json_encode($obj), true), $isMetaData);
        }

        return $obj;
    }
991722
public function generate($obj = null)
		{
			// se possui conteúdo
			if ($this->children)
			{
				// percorre todos objetos filhos
				foreach ($this->children as $child)
				{
					// se for objeto
					if (is_object($child))
					{
						$child->generate($obj);
					}
				}
				// fecha a tag
				//$this->close();
			}

		}
630069
public function push($obj)
    {
        if (!$obj) {
            return;
        }

        $cls           = get_called_class();
        $escape        = Driver::$escape_char;
        $value         = array_key_exists(self::getPK(), $this->_data) ? $this->_data[self::getPK()] : null;
        $other_cls     = get_class($obj);
        $other_pk      = $other_cls::getPK();
        $other_value   = $obj->get($other_pk);
        $table         = Model::getTableName($other_cls);
        $foreign       = self::hasManyForeignKey(Inflections::pluralize(strtolower($other_cls)));

        // if the current object exists ...
        if (!is_null($value)) {
            $obj->set(strtolower($foreign), $value);

            // if the pushed object is still not saved
            if (is_null($other_value)) {
                if (!$obj->save()) {
                    return false;
                }
                $other_value = $obj->get($other_pk);
            }

            $foreign    = self::$_mapping[$other_cls][$foreign];
            $other_pk   = self::$_mapping[$other_cls][$other_pk];
            $sql        = "update $escape$table$escape set $escape$foreign$escape=$value where $escape$other_pk$escape=$other_value";
            $stmt       = self::query($sql);
            $rst        = $stmt->rowCount()==1;
            self::closeCursor($stmt);
            return $rst;
        }

        // if current object does not exists ...
        if (is_null($value)) {
            $this->_pushLater($obj);
        }
    }
873873
public function preCacheTranslateObject(ModelObject $obj)
    {
        $plugin = $this->PluginService->getByID($obj->PluginID);
        if(empty($plugin) || !$plugin->isInstalled() || !$plugin->isEnabled())
            return null;

        if($obj->getXMLSchema() != '') {
            // resolve schema
            $schemaXML = "<?xml version='1.0'?><schema>";
            $schemaXML .= preg_replace('/\<\?xml([^\>\/]*)\>/', '' , $obj->getXMLSchema());
            $schemaXML .= "</schema>";

            try {
                $schema = $this->NodeSchemaParser->parse($schemaXML);
            }catch(Exception $e){
                throw new SchemaException("Unable to parse schema for aspect [{$obj->Slug}]:\n ". $e->getMessage());
            }

            $obj->setSchema($schema);
        } else {
            $obj->setSchema(new NodeSchema());
        }


        return $obj;
    }