Destroys the cursors
@param  boolean $notify
@return boolean Success
548948
public function destroy($notify = false)
    {
        if ($this->destroyed) {
            return false;
        }
        $this->destroyed = true;
        if ($notify) {
            if ($this->callback) {
                $func = $this->callback;
                $func($this);
            }
        }
        unset($this->conn->cursors[$this->id]);
        return true;
    }
1076286
public function markAllAsSeen(NotifiableInterface $notifiable, $flush = false)
    {
        $nns = $this->notifiableNotificationRepository->findAllForNotifiable(
            $this->generateIdentifier($notifiable),
            ClassUtils::getRealClass(get_class($notifiable))
        );
        foreach ($nns as $nn) {
            $nn->setSeen(true);
            $event = new NotificationEvent($nn->getNotification(), $notifiable);
            $this->dispatcher->dispatch(MgiletNotificationEvents::SEEN, $event);
        }
        $this->flush($flush);
    }
1195720
public static function delete($target, $include_target = true)
    {
        if (!is_dir($target)) {
            return false;
        }

        $success = self::doDelete($target, $include_target);

        if (!$success) {
            $error = error_get_last();
            throw new \RuntimeException($error['message']);
        }

        // Make sure that the change will be detected when caching.
        if ($include_target) {
            @touch(dirname($target));
        } else {
            @touch($target);
        }

        return $success;
    }
1150923
public function sendNow($notifiables, $notification)
    {
        if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
            $notifiables = [$notifiables];
        }

        $original = clone $notification;

        foreach ($notifiables as $notifiable) {
            $notification = clone $original;

            $notification->id = (string) Uuid::uuid4();

            $channels = $notification->via($notifiable);

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

            foreach ($channels as $channel) {
                if (! $this->shouldSendNotification($notifiable, $notification, $channel)) {
                    continue;
                }

                $response = $this->driver($channel)->send($notifiable, $notification);

                $this->app->make('events')->fire(
                    new Events\NotificationSent($notifiable, $notification, $channel, $response)
                );
            }
        }
    }
633241
public function destroy()
	{
		foreach ($this->recipients()->rows() as $recipient)
		{
			if (!$recipient->destroy())
			{
				$this->addError($recipient->getError());
				return false;
			}
		}

		foreach ($this->children()->rows() as $child)
		{
			if (!$child->destroy())
			{
				$this->addError($child->getError());
				return false;
			}
		}

		$result = parent::destroy();

		if ($result)
		{
			Event::trigger('activity.onLogDelete', [$this]);
		}

		return $result;
	}
950815
public function closeCursor()
    {
        if (!$this->_stmt) {
            return false;
        }

        sqlsrv_free_stmt($this->_stmt);
        $this->_stmt = false;
        return true;
    }
155670
public function block( $model, $notify = true, $config = [] ) {

		if( !$model->isBlocked( true ) ) {

			$model = $this->updateStatus( $model, IApproval::STATUS_BLOCKED );

			if( $notify ) {

				$title = ucfirst( self::$parentType ) . ' - ' . $model->getClassName() . ' - Blocked';

				$config[ 'template' ] = CoreGlobal::TPL_NOTIFY_STATUS_BLOCK;
				$config[ 'data' ][ 'message' ] = $model->getRejectMessage();

				$this->notifyUser( $model, $config, $title );
			}

			return $model;
		}

		return false;
	}
1179048
public static final function notice( $text, $close = false ) {
		$callback = function () use ( &$text, &$close ) {
			$close = ( $close ) ? ' notice is-dismissible' : '';
			self::nt( $text );
		};
		Action::adminNotices( $callback );
	}
543670
public function validate($notify = false)
    {
        $validator = $this->getValidator();
        if ($validator) {
            // Expand the schema.
            // TODO: recurse & $value->validate() instead?
            $schema = clone $this->schema;
            $this->resolver->resolve($schema, $this->schema_path);

            // Set to current values.
            $values = $this->flatValue();
            if (isset($values)) {
                $validator->check($values, $schema);
                if (!$validator->isValid()) {
                    $errors = $validator->getErrors();
                    if (empty($errors)) {
                        // Create a top level schema error since something is wrong.
                        $errors = array(array(
                            'property' => $this->schema_path,
                            'message' => 'The JSON schema failed validation.',
                            'constraint' => null,
                        ));
                    }

                    // Log errors.
                    if ($notify) {
                        foreach ($errors as $error) {
                            $error_keys = array(
                              '%name' => $this->schema_name,
                              '%message' => $error['message'],
                              '%property' => isset($error['property']) ? $error['property'] : 'property',
                              '%constraint' => isset($error['constraint']) ? $error['constraint'] : 'unknown',
                            );

                            $this->logger->notice('Schema Validation: "%message" in schema "%name", property "%property" for constraint %constraint', $error_keys);
                        }
                    }

                    return $errors;
                }
            }
        }

        return true;
    }
1131943
public function send($notifiable, Notification $notification)
    {
        $message = $this->getData($notifiable, $notification);

        $event = new BroadcastNotificationCreated(
            $notifiable, $notification, is_array($message) ? $message : $message->data
        );

        if ($message instanceof BroadcastMessage) {
            $event->onConnection($message->connection)
                  ->onQueue($message->queue);
        }

        return $this->events->dispatch($event);
    }
376422
private function setFullNameEmbeddable(FullNameEmbeddableInterface $fullNameEmbeddable, bool $notify = true): self
    {
        $this->fullNameEmbeddable = $fullNameEmbeddable;
        $this->fullNameEmbeddable->setOwningEntity($this);
        if (true === $notify) {
            $this->notifyEmbeddablePrefixedProperties(
                HasFullNameEmbeddableInterface::PROP_FULL_NAME_EMBEDDABLE
            );
        }

        return $this;
    }
830869
public function _destroy($pId)
    {
        if (! isset($this->_items[$pId])) {
            $this->_items[$pId] = Agl::getModel(self::DB_COLLECTION);
            $this->_items[$pId]->loadByRealid($pId);
        }

        if ($this->_items[$pId]->getId()) {
            $this->_items[$pId]->delete();
        }

        return true;
    }
522985
def delete(self, **kwargs):
        """"""
        url = self.base_url + '/%s' % kwargs['notification_id']
        resp = self.client.delete(url=url)
        return resp
150825
function destroy():bool
    {
        if($this->isStart){
            $this->data = [];
            $this->handler->destroy($this->sid);
            return true;
        }else{
            return false;
        }
    }
1064102
protected function handle(NotificationInterface $notification, NotificationHandlerInterface $handler): bool
    {
        if (! $handler->supports($notification)) {
            return false;
        }

        $cloned = clone $notification;

        $event = new NotifyEvent($cloned, $handler);
        $this->eventDispatcher->dispatch(Events::NOTIFY, $event);

        $handler->notify($cloned);

        foreach ($cloned->getResultSet()->all() as $result) {
            $notification->addResult($result);
        }

        return true;
    }
689670
public static function destroy()
    {
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId])) {
            unset(self::$context[$coroutineId]);
        }
    }
508038
public function closeCursor()
	{
		if($this->isFetched == false)
		{
			throw new LikePDOException("There is no fetch statement");
			return false;
		}
		else
		{
			do
			{
				while($this->fetch());
					
				if(!$this->nextRowset())
					break;
					
			} while(true);
			
			return true;
		}
	}