public function textRenderer(string $text, string $dataType = 'text'): Renderer
    {
        if (!$this->allowedTypeExist($dataType)) {
            throw new Server500(new \ArrayObject(array("explain" => 'Undefined {'.$dataType.'} type for text render',
                "solution" => "Please set the allowed text render type : ".json_encode($this->allowed_text_render))));
        }
        array_push(self::$buffer_text, array("text" => $text, "type" => $dataType));
        $this->display_elements = array("text" => $text, "type" => $dataType);
        return ($this);
    }
public function textRenderer(string $text, string $dataType = 'text'): Renderer
    {
        if (!$this->allowedTypeExist($dataType)) {
            throw new Server500(new \ArrayObject(array("explain" => 'Undefined {'.$dataType.'} type for text render',
                "solution" => "Please set the allowed text render type : ".json_encode($this->allowed_text_render))));
        }
        array_push(self::$buffer_text, array("text" => $text, "type" => $dataType));
        $this->display_elements = array("text" => $text, "type" => $dataType);
        return ($this);
    }
public function textRenderer ( string $ text , string $ dataType = 'text' ) : Renderer { if ( ! $ this -> allowedTypeExist ( $ dataType ) ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => 'Undefined {' . $ dataType . '} type for text render' , "solution" => "Please set the allowed text render type : " . json_encode ( $ this -> allowed_text_render ) ) ) ) ; } array_push ( self :: $ buffer_text , array ( "text" => $ text , "type" => $ dataType ) ) ; $ this -> display_elements = array ( "text" => $ text , "type" => $ dataType ) ; return ( $ this ) ; }
Display text on screen
@param string $text text value
@param string $dataType The data type
@return Renderer The renderer object
@throws
Display text on screen