src/Html2Pdf.php
protected function _listeAddLevel($type = 'ul', $style = '', $img = null, $start = null)
    {
        // get the url of the image, if we want to use a image
        if ($img) {
            if (preg_match('/^url\(([^)]+)\)$/isU', trim($img), $match)) {
                $img = $match[1];
            } else {
                $img = null;
            }
        } else {
            $img = null;
        }

        // prepare the datas
        if (!in_array($type, array('ul', 'ol'))) {
            $type = 'ul';
        }
        if (!in_array($style, array('lower-alpha', 'upper-alpha', 'upper-roman', 'lower-roman', 'decimal', 'square', 'circle', 'disc', 'none'))) {
            $style = '';
        }

        if (!$style) {
            if ($type === 'ul') {
                $style = 'disc';
            } else {
                $style = 'decimal';
            }
        }

        if (is_null($start) || (int) $start<1) {
            $start=0;
        } else {
            $start--;
        }

        // add the new level
        $this->_defList[count($this->_defList)] = array('style' => $style, 'nb' => $start, 'img' => $img);
    }
protected function _listeAddLevel($type = 'ul', $style = '', $img = null, $start = null)
    {
        // get the url of the image, if we want to use a image
        if ($img) {
            if (preg_match('/^url\(([^)]+)\)$/isU', trim($img), $match)) {
                $img = $match[1];
            } else {
                $img = null;
            }
        } else {
            $img = null;
        }

        // prepare the datas
        if (!in_array($type, array('ul', 'ol'))) {
            $type = 'ul';
        }
        if (!in_array($style, array('lower-alpha', 'upper-alpha', 'upper-roman', 'lower-roman', 'decimal', 'square', 'circle', 'disc', 'none'))) {
            $style = '';
        }

        if (!$style) {
            if ($type === 'ul') {
                $style = 'disc';
            } else {
                $style = 'decimal';
            }
        }

        if (is_null($start) || (int) $start<1) {
            $start=0;
        } else {
            $start--;
        }

        // add the new level
        $this->_defList[count($this->_defList)] = array('style' => $style, 'nb' => $start, 'img' => $img);
    }
protected function _listeAddLevel ( $ type = 'ul' , $ style = '' , $ img = null , $ start = null ) { // get the url of the image, if we want to use a image if ( $ img ) { if ( preg_match ( '/^url\(([^)]+)\)$/isU' , trim ( $ img ) , $ match ) ) { $ img = $ match [ 1 ] ; } else { $ img = null ; } } else { $ img = null ; } // prepare the datas if ( ! in_array ( $ type , array ( 'ul' , 'ol' ) ) ) { $ type = 'ul' ; } if ( ! in_array ( $ style , array ( 'lower-alpha' , 'upper-alpha' , 'upper-roman' , 'lower-roman' , 'decimal' , 'square' , 'circle' , 'disc' , 'none' ) ) ) { $ style = '' ; } if ( ! $ style ) { if ( $ type === 'ul' ) { $ style = 'disc' ; } else { $ style = 'decimal' ; } } if ( is_null ( $ start ) || ( int ) $ start < 1 ) { $ start = 0 ; } else { $ start -- ; } // add the new level $ this -> _defList [ count ( $ this -> _defList ) ] = array ( 'style' => $ style , 'nb' => $ start , 'img' => $ img ) ; }
add a level to the list

@access protected
@param  string $type  : ul, ol
@param  string $style : lower-alpha, ...
@param  string $img
add a level to the list