Remove a subject from the list

@param \SplSubject $subject The subject to remove from the list

@return $this

@throws \Exception If the subject has not been found into the list
763741
public function removeSubject(\SplSubject $subject): self
    {
        $key = array_search($subject, $this->subjectList, true);
        
        if ($key === false) {
            throw new Exception(
                'The subject has not been found.',
                self::ERR_SUBJECT_NOT_FOUND
            );
        }
        
        unset($this->subjectList[$key]);

        return $this;
    }
1370881
protected function supportSubject($subject)
    {
        foreach ($this->getSupportedClasses() as $supportedClass) {
            if ($subject instanceof StatusableInterface && $subject instanceof $supportedClass) {
                return true;
            }
        }

        return false;
    }
678563
public function removeSubscriber($person)
    {
        $mixer = $this->_mixer;
        $subscription = $this->subscriptions
                             ->find(array(
                                'subscriber' => $person,
                                'subscribee' => $mixer, ));

        if ($subscription) {
            $this->subscriptions->extract($subscription);
            return $this->_mixer;
        }
    }
831577
public function update(\SplSubject $subject)
    {
        if (!$subject instanceof EventInterface) {
            throw new \InvalidArgumentException('Command can only be attached to an event!');
        }
        if (method_exists($this, '__invoke')) {
            call_user_func_array($this, $subject->getInvokeArgs());
        } else {
            throw new \Exception('Command should have at least one __invoke method');
        }
    }
1342287
public function stickSubjectAction(Subject $subject)
    {
        $forum = $subject->getCategory()->getForum();
        $this->checkAccess($forum);
        $this->manager->stickSubject($subject);

        return new RedirectResponse(
            $this->generateUrl('claro_forum_subjects', array('category' => $subject->getCategory()->getId()))
        );
    }
113827
public function subject($subject = null)
    {
        deprecationWarning('Email::subject() is deprecated. Use Email::setSubject() or Email::getSubject() instead.');

        if ($subject === null) {
            return $this->getSubject();
        }

        return $this->setSubject($subject);
    }
262419
public function update(SplSubject $subject)
    {
        if ($subject instanceof Model) {
            $this->data = \array_merge($this->data, $subject->get());
        }
    }
258559
public function detach(SplObserver $observer)
    {
        $key = array_search($observer, $this->observers, true);
        
        if ($key === false) {
            throw new Exception(
                'The observer has not been found.',
                self::ERR_OBSERVER_NOT_FOUND
            );
        }
        
        unset($this->observers[$key]);
    }
1259065
public function setGlobalSubject($subject)
    {
        if (!($subject instanceof Subject)) {
            $subject = new Subject($subject);
        }
        $this->subject = $subject;
    }
497988
public function decorate($subject)
    {
        if (is_object($subject)) {
            $subject = clone $subject;
        }

        if ($subject instanceof Model) {
            foreach ($subject->getRelations() as $relationName => $model) {
                $subject->setRelation($relationName, $this->autoPresenter->decorate($model));
            }
        }

        if (!$subject instanceof HasPresenter) {
            return $subject;
        }

        if (!class_exists($presenter = $subject->getPresenterClass())) {
            throw new PresenterNotFoundException($presenter);
        }

        return $this->container->make($presenter)->setWrappedObject($subject);
    }
389955
public function fromSubject(JWTSubject $subject)
    {
        $payload = $this->makePayload($subject);

        return $this->manager->encode($payload)->get();
    }
812019
public void removeSubject(String subject) {
        String prefix = normalizePrefix(subject);

        for (String suffix : getSuffixes(prefix).keySet()) {
            setItem(prefix + suffix, null);
        }
    }
584094
public function setSubject( $subject )
    {
        $translator = $this->getTranslator();
        $this->subject = $translator ? $translator->trans( $subject ) : $subject;
    }
1010367
public function setSubject($subject)
    {
        if ($this->_subject === null) {
            $subject = $this->_filterOther($subject);
            $this->_subject = $this->_encodeHeader($subject);
            $this->_storeHeader('Subject', $this->_subject);
        } else {
            /**
             * @see Zend_Mail_Exception
             */
            // require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('Subject set twice');
        }
        return $this;
    }
608620
public function decorate($subject)
    {
        if (is_object($subject)) {
            $subject = clone $subject;
        }

        if ($subject instanceof Model) {
            foreach ($subject->getRelations() as $relationName => $model) {
                $subject->setRelation($relationName, $this->autoPresenter->decorate($model));
            }
        }

        $presenter = $this->autoPresenterMapper->getPresenter($subject);

        if ($presenter === null) {
            return $subject;
        }

        if (! class_exists($presenter)) {
            throw new PresenterNotFoundException($presenter);
        }

        return $this->container->make($presenter)->setWrappedObject($subject);
    }
80621
private function resolveSubject(Subject $part)
    {
        $subject = $part->getSubject();
        foreach ($part->getParameters() as $search => $replace) {
            $subject = str_replace($search, $replace, $subject);
        }

        return $subject;
    }
1200276
public function attachSubject($event, \SplSubject $subject)
    {
        $key = $this->getUniqueKey($event);

        if (!array_key_exists($event, $this->subjects)) {
            $this->subjects[$event] = array();
        }

        $this->subjects[$event][$key] = $subject;

        return $key;
    }