private function setComplement($complement)
    {
        $this->getStates();
        $this->setComplementParams($complement);

        $state = $this->getState();
        $action = $this->getAction($state);

        $this->setAction($action);
        $this->setState($state);
        $this->getSettings();

        $states = ['active', 'outdated'];

        if (in_array($action, self::$hooks, true) || in_array($state, $states, true)) {
            $this->addRoutes();
            $this->addActions();
            $this->doActions($action);
        }

        return true;
    }
private function setComplement($complement)
    {
        $this->getStates();
        $this->setComplementParams($complement);

        $state = $this->getState();
        $action = $this->getAction($state);

        $this->setAction($action);
        $this->setState($state);
        $this->getSettings();

        $states = ['active', 'outdated'];

        if (in_array($action, self::$hooks, true) || in_array($state, $states, true)) {
            $this->addRoutes();
            $this->addActions();
            $this->doActions($action);
        }

        return true;
    }
private function setComplement ( $ complement ) { $ this -> getStates ( ) ; $ this -> setComplementParams ( $ complement ) ; $ state = $ this -> getState ( ) ; $ action = $ this -> getAction ( $ state ) ; $ this -> setAction ( $ action ) ; $ this -> setState ( $ state ) ; $ this -> getSettings ( ) ; $ states = [ 'active' , 'outdated' ] ; if ( in_array ( $ action , self :: $ hooks , true ) || in_array ( $ state , $ states , true ) ) { $ this -> addRoutes ( ) ; $ this -> addActions ( ) ; $ this -> doActions ( $ action ) ; } return true ; }
Set complement.

@param string $complement → complement settings

@uses \Eliasis\Complement\Traits\ComplementState->getStates()
@uses \Eliasis\Complement\Traits\ComplementState->getState()
@uses \Eliasis\Complement\Traits\ComplementState->setState()
@uses \Eliasis\Complement\Traits\ComplementAction->getAction()
@uses \Eliasis\Complement\Traits\ComplementAction->setAction()
@uses \Eliasis\Complement\Traits\ComplementAction->addActions()
@uses \Eliasis\Complement\Traits\ComplementAction->doActions()

@return bool true
Set complement .