protected function drawListItem($bullet, $text) {

        // determine the blank space indentation
        $indentation = $this->createIndentation();

        // In unordered list, the bullet can be specified
        $left = $indentation . $bullet;

        // determine the width of the bullet text
        $bulletTextArea = $this->clio->getWidth() - strlen($left);
        
        // word wrap the rest of the bullet
        $text = $this->clio->wordwrap($text,$bulletTextArea, false);

        // create an empty string that is the same with of the bullet
        $emptyBullet = str_pad("",strlen($bullet));

        // replace all newlines with a newline then indentation, then an empty bullet
        $text = str_replace("\n", "\n" . $indentation . $emptyBullet, $text);

        // show the bullet and text on multiple lines (if needed)
        $this->clio->display($left . $text)->newLine();

    }
protected function drawListItem($bullet, $text) {

        // determine the blank space indentation
        $indentation = $this->createIndentation();

        // In unordered list, the bullet can be specified
        $left = $indentation . $bullet;

        // determine the width of the bullet text
        $bulletTextArea = $this->clio->getWidth() - strlen($left);
        
        // word wrap the rest of the bullet
        $text = $this->clio->wordwrap($text,$bulletTextArea, false);

        // create an empty string that is the same with of the bullet
        $emptyBullet = str_pad("",strlen($bullet));

        // replace all newlines with a newline then indentation, then an empty bullet
        $text = str_replace("\n", "\n" . $indentation . $emptyBullet, $text);

        // show the bullet and text on multiple lines (if needed)
        $this->clio->display($left . $text)->newLine();

    }
protected function drawListItem ( $ bullet , $ text ) { // determine the blank space indentation $ indentation = $ this -> createIndentation ( ) ; // In unordered list, the bullet can be specified $ left = $ indentation . $ bullet ; // determine the width of the bullet text $ bulletTextArea = $ this -> clio -> getWidth ( ) - strlen ( $ left ) ; // word wrap the rest of the bullet $ text = $ this -> clio -> wordwrap ( $ text , $ bulletTextArea , false ) ; // create an empty string that is the same with of the bullet $ emptyBullet = str_pad ( "" , strlen ( $ bullet ) ) ; // replace all newlines with a newline then indentation, then an empty bullet $ text = str_replace ( "\n" , "\n" . $ indentation . $ emptyBullet , $ text ) ; // show the bullet and text on multiple lines (if needed) $ this -> clio -> display ( $ left . $ text ) -> newLine ( ) ; }
Helper function to draw one list item

@param string $bullet - the bullet plus any white space to the right
@param string $text
Helper function to draw one list item