Removes an object from LDAP.

@param LdapObject $ldapObject
@param bool $recursively
972548
public function delete(LdapObject $ldapObject, $recursively = false)
    {
        $this->dispatcher->dispatch(new LdapObjectEvent(Event::LDAP_OBJECT_BEFORE_DELETE, $ldapObject));
        $this->validateObject($ldapObject);

        $operation = new DeleteOperation($ldapObject->get('dn'));
        if ($recursively) {
            $operation->addControl((new LdapControl(LdapControlOid::SubTreeDelete))->setCriticality(true));
        }

        $this->connection->execute($operation);
        $this->dispatcher->dispatch(new LdapObjectEvent(Event::LDAP_OBJECT_AFTER_DELETE, $ldapObject));
    }
345852
public function remove($object)
    {
        $this
            ->objectManager
            ->remove($object);

        $this
            ->objectManager
            ->flush($object);
    }
1325970
public function delete($dn)
	{
		if (!$this->isBound || !$this->isConnected())
		{
			return false;
		}

		return ldap_delete($this->resource, $dn);
	}
1041233
public function unbind()
	{
		if ($this->isBound && $this->resource && \is_resource($this->resource))
		{
			return ldap_unbind($this->resource);
		}

		return true;
	}
1354695
protected function destroy( ValueObject $object )
    {
         /** @var \eZ\Publish\API\Repository\Repository $repository */
        $repository = $this->getRepository();
        $contentId = $object->id;
        $repository->sudo(
            function() use( $repository, $contentId )
            {
                try
                {
                    $contentService = $repository->getContentService();
                    $contentInfo = $contentService->loadContentInfo( $contentId );
                    $contentService->deleteContent( $contentInfo );
                }
                catch ( ApiExceptions\NotFoundException $e )
                {
                    // Nothing to do
                }
            }
        );
    }
470547
public function newEntity($ldapObject)
    {
        $entity = $this->getEntity();
        if (isset($ldapObject['uid']['0'])) {
            $entity->setUsername($ldapObject['uid']['0']);
            $entity->setDisplayName($ldapObject['cn']['0']);
            $entity->setEmail($ldapObject['mail']['0']);
            $entity->setPassword(md5('HandledByLdap'));
            $entity->setRoles(serialize($this->getLdapRoles($ldapObject)));
        }
        return $entity;
    }
27439
public function delete(bool $recursive = true): bool
    {
        $this->each(function (Folder $item) use ($recursive) {
            $item->delete($recursive);
        });

        return true;
    }
1185133
public function move(LdapObject $ldapObject, $container)
    {
        $this->getObjectManager()->move($ldapObject, $container);

        return $this;
    }
452929
public function remove($object)
    {
        foreach (array_keys($this->dataPlaceHolder) as $k) {
            if ($this->dataPlaceHolder[$k] === $object) {
                unset($this->dataPlaceHolder[$k]);

                return;
            }
        }
    }
387270
public static function reset($object)
	{
		if (!($object instanceof ServiceDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\ServiceDescriptorProto.');
		}
		$object->name = NULL;
		$object->method = NULL;
		$object->options = NULL;
	}
515125
public function remove($object)
    {
        if ($object instanceof NodeInterface) {
            $object = $object->getNodeData();
        }
        if ($this->addedNodes->contains($object)) {
            $this->addedNodes->detach($object);
        }
        if (!$this->removedNodes->contains($object)) {
            $this->removedNodes->attach($object);
        }
        parent::remove($object);
    }
998795
public void remove (Object object) {
		if (!idToObject.containsValue(object, true)) return;
		int objectID = idToObject.findKey(object, true, -1);
		idToObject.remove(objectID);
		objectToID.remove(object, 0);
		if (TRACE) trace("kryonet", "Object " + objectID + " removed from ObjectSpace: " + object);
	}
477099
public function deleteObject($name)
    {
        if (is_object($name) && $name instanceof Object) {
            $name = $name->getName();
        }

        $this->connection->makeRequest(Client::DELETE, array($this->name, $name));
    }
1058739
public static function delete($path, $recursive = false)
    {
        Path::validatePath($path);

        if ($recursive) {
            Path::purge($path);
        }

        if (@rmdir($path)) {
            return;
        }

        throw new IOException(sprintf("Cannot delete path %s.", $path));
    }
428873
public function delete_object_from_relationships( $id, $object, $name = null ) {

		/**
		 * @var $pods_init \PodsInit
		 */
		global $pods_init;

		$pod = false;

		// Run any bidirectional delete operations
		if ( is_array( $object ) ) {
			$pod = $object;
		} elseif ( is_object( $pods_init ) ) {
			$pod = PodsInit::$meta->get_object( $object, $name );
		}

		if ( ! empty( $pod ) ) {
			$object = $pod['type'];
			$name   = $pod['name'];

			foreach ( $pod['fields'] as $field ) {
				PodsForm::delete( $field['type'], $id, $field['name'], array_merge( $field, $field['options'] ), $pod );
			}
		}

		// Lookup related fields (non-bidirectional)
		$params = array(
			'where' => array(
				array(
					'key'   => 'type',
					'value' => 'pick'
				),
				array(
					'key'   => 'pick_object',
					'value' => $object
				)
			)
		);

		if ( ! empty( $name ) && $name !== $object ) {
			$params['where'][] = array(
				'key'   => 'pick_val',
				'value' => $name
			);
		}

		$fields = $this->load_fields( $params, false );

		if ( ! empty( $pod ) && 'media' === $pod['type'] ) {
			$params['where'] = array(
				array(
					'key'   => 'type',
					'value' => 'file'
				)
			);

			$fields = array_merge( $fields, $this->load_fields( $params, false ) );
		}

		if ( is_array( $fields ) && ! empty( $fields ) ) {
			foreach ( $fields as $related_field ) {
				$related_pod = $this->load_pod( array( 'id' => $related_field['pod_id'], 'fields' => false ), false );

				if ( empty( $related_pod ) ) {
					continue;
				}

				$related_from = $this->lookup_related_items_from( $related_field['id'], $related_pod['id'], $id, $related_field, $related_pod );

				$this->delete_relationships( $related_from, $id, $related_pod, $related_field );
			}
		}

		if ( ! empty( $pod ) && ! pods_tableless() ) {
			pods_query( "
				DELETE FROM `@wp_podsrel`
				WHERE
				(
					`pod_id` = %d
					AND `item_id` = %d
				)
				OR (
					`related_pod_id` = %d
					AND `related_item_id` = %d
				)
			", array(
				$pod['id'],
				$id,

				$pod['id'],
				$id
			) );
		}

		return true;
	}
586891
public static function reset($object)
	{
		if (!($object instanceof EnumDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\EnumDescriptorProto.');
		}
		$object->name = NULL;
		$object->value = NULL;
		$object->options = NULL;
	}
1048090
public function remove($object)
    {
        // create property accessor
        $accessor = PropertyAccess::createPropertyAccessor();

        // delete existing documents with same id
        foreach ($this->index->find('id:' . $accessor->getValue($object, 'id')) as $hit) {
            $this->index->delete($hit->id);
        }
    }