public function build($rowNumber, $cellNumber, $cellValue, $styleId = 0)
    {
        $cellId = $this->getCellId($cellNumber, $rowNumber);

        if (is_int($cellValue) || is_float($cellValue)) {
            return sprintf(CellXml::NUMBER_XML, $cellId, $styleId, $cellValue);
        } elseif (is_bool($cellValue)) {
            return sprintf(CellXml::BOOLEAN_XML, $cellId, $styleId, (int)$cellValue);
        } elseif (0 === strlen($cellValue)) {
            return 0 === $styleId ? '' : sprintf(CellXml::EMPTY_XML, $cellId, $styleId);
        }

        return sprintf(CellXml::STRING_XML, $cellId, $styleId, $this->escape($cellValue));
    }
public function build($rowNumber, $cellNumber, $cellValue, $styleId = 0)
    {
        $cellId = $this->getCellId($cellNumber, $rowNumber);

        if (is_int($cellValue) || is_float($cellValue)) {
            return sprintf(CellXml::NUMBER_XML, $cellId, $styleId, $cellValue);
        } elseif (is_bool($cellValue)) {
            return sprintf(CellXml::BOOLEAN_XML, $cellId, $styleId, (int)$cellValue);
        } elseif (0 === strlen($cellValue)) {
            return 0 === $styleId ? '' : sprintf(CellXml::EMPTY_XML, $cellId, $styleId);
        }

        return sprintf(CellXml::STRING_XML, $cellId, $styleId, $this->escape($cellValue));
    }
public function build ( $ rowNumber , $ cellNumber , $ cellValue , $ styleId = 0 ) { $ cellId = $ this -> getCellId ( $ cellNumber , $ rowNumber ) ; if ( is_int ( $ cellValue ) || is_float ( $ cellValue ) ) { return sprintf ( CellXml :: NUMBER_XML , $ cellId , $ styleId , $ cellValue ) ; } elseif ( is_bool ( $ cellValue ) ) { return sprintf ( CellXml :: BOOLEAN_XML , $ cellId , $ styleId , ( int ) $ cellValue ) ; } elseif ( 0 === strlen ( $ cellValue ) ) { return 0 === $ styleId ? '' : sprintf ( CellXml :: EMPTY_XML , $ cellId , $ styleId ) ; } return sprintf ( CellXml :: STRING_XML , $ cellId , $ styleId , $ this -> escape ( $ cellValue ) ) ; }
Build and return the string for a single cell.

@param int   $rowNumber
@param int   $cellNumber
@param mixed $cellValue
@param int   $styleId

@return string
Build and return the string for a single cell .