public function beforeAction($action)
    {
        try {
            if (parent::beforeAction($action)) {
                $this->db = !$this->db ? Podium::getInstance()->getDb() : Instance::ensure($this->db, Connection::className());
                $this->mailer = Instance::ensure($this->mailer, BaseMailer::className());
                return true;
            }
        } catch (Exception $e) {
            $this->stderr("ERROR: " . $e->getMessage() . "\n");
        }
        return false;
    }
public function beforeAction($action)
    {
        try {
            if (parent::beforeAction($action)) {
                $this->db = !$this->db ? Podium::getInstance()->getDb() : Instance::ensure($this->db, Connection::className());
                $this->mailer = Instance::ensure($this->mailer, BaseMailer::className());
                return true;
            }
        } catch (Exception $e) {
            $this->stderr("ERROR: " . $e->getMessage() . "\n");
        }
        return false;
    }
public function beforeAction ( $ action ) { try { if ( parent :: beforeAction ( $ action ) ) { $ this -> db = ! $ this -> db ? Podium :: getInstance ( ) -> getDb ( ) : Instance :: ensure ( $ this -> db , Connection :: className ( ) ) ; $ this -> mailer = Instance :: ensure ( $ this -> mailer , BaseMailer :: className ( ) ) ; return true ; } } catch ( Exception $ e ) { $ this -> stderr ( "ERROR: " . $ e -> getMessage ( ) . "\n" ) ; } return false ; }
Checks the existence of the db and mailer components.
@param Action $action the action to be executed.
@return bool whether the action should continue to be executed.
Checks the existence of the db and mailer components .