code: public function getFormatter()
      {
          if ($this->_formatter === null) {
              $this->_formatter = Yii::$app->format;
          }
  
          return $this->_formatter;
      }
docs: Get formatter.
  
  @return CFormatter the formatter instance. Defaults to the 'format' application component.