PHP 클래스 PHPRtfLite_Container_Base

저자: Steffen Zeidler ([email protected])
파일 보기 프로젝트 열기: phprtflite/phprtflite 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_elements PHPRtfLite_Table_Cell[] | PHPRtfLite_Element[] | PHPRtfLite_Image[] | PHPRtfLite_FormField[]
$_pard string
$_rtf PHPRtfLite

공개 메소드들

메소드 설명
__construct ( PHPRtfLite $rtf ) constructor
addElement ( $element ) adds element
addEmptyParagraph ( PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element adds empty paragraph to container.
addImage ( string $fileName, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image adds image to element container.
addImageFromString ( string $string, string $type, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image adds image to element container.
addTable ( string $alignment = PHPRtfLite_Table::ALIGN_LEFT ) : PHPRtfLite_Table adds table to element container.
countElements ( ) : integer counts container elements
free ( )
getElements ( ) : array gets container elements
getRtf ( ) : PHPRtfLite gets rtf object
render ( ) : string renders rtf code for that container
writeHyperLink ( string $hyperlink, string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element writes hyperlink to container.
writePlainRtfCode ( string $code ) : PHPRtfLite_Element adds element with plain rtf code directly (no converting will be made by PHPRtfLite - even no opening and closing curly brackets)
writeRtfCode ( string $code, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element adds element with rtf code directly (no converting will be made by PHPRtfLite)
writeText ( string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element writes text to container.

비공개 메소드들

메소드 설명
getCellFont ( PHPRtfLite_Table $element ) : PHPRtfLite_Font gets font if container is a cell
needToAddParagraphEnd ( integer $key ) : boolean checks, if a \par has to be added

메소드 상세

__construct() 공개 메소드

constructor
public __construct ( PHPRtfLite $rtf )
$rtf PHPRtfLite

addElement() 공개 메소드

adds element
public addElement ( $element )
$element

addEmptyParagraph() 공개 메소드

adds empty paragraph to container.
public addEmptyParagraph ( PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element
$font PHPRtfLite_Font
$parFormat PHPRtfLite_ParFormat
리턴 PHPRtfLite_Element

addImage() 공개 메소드

adds image to element container.
public addImage ( string $fileName, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image
$fileName string name of image file.
$parFormat PHPRtfLite_ParFormat paragraph format, ff null image will appear in the same paragraph.
$width float if null image is displayed by it's height.
$height float if null image is displayed by it's width. If boths parameters are null, image is displayed as it is.
리턴 PHPRtfLite_Image

addImageFromString() 공개 메소드

adds image to element container.
public addImageFromString ( string $string, string $type, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image
$string string name of image file.
$type string class constants of PHPRtfLite_Image: TYPE_JPEG, TYPE_PNG, TYPE_WMF
$parFormat PHPRtfLite_ParFormat paragraph format, ff null image will appear in the same paragraph.
$width float if null image is displayed by it's height.
$height float if null image is displayed by it's width. If boths parameters are null, image is displayed as it is.
리턴 PHPRtfLite_Image

addTable() 공개 메소드

adds table to element container.
public addTable ( string $alignment = PHPRtfLite_Table::ALIGN_LEFT ) : PHPRtfLite_Table
$alignment string Alingment of table. Represented by class constants PHPRtfLite_Table::ALIGN_*
Possible values:
PHPRtfLite_Table::ALIGN_LEFT => 'left',
PHPRtfLite_Table::ALIGN_CENTER => 'center',
PHPRtfLite_Table::ALIGN_RIGHT => 'right'
리턴 PHPRtfLite_Table

countElements() 공개 메소드

counts container elements
public countElements ( ) : integer
리턴 integer

free() 공개 메소드

public free ( )

getElements() 공개 메소드

gets container elements
public getElements ( ) : array
리턴 array

getRtf() 공개 메소드

gets rtf object
public getRtf ( ) : PHPRtfLite
리턴 PHPRtfLite

render() 공개 메소드

renders rtf code for that container
public render ( ) : string
리턴 string rtf code

writePlainRtfCode() 공개 메소드

adds element with plain rtf code directly (no converting will be made by PHPRtfLite - even no opening and closing curly brackets)
public writePlainRtfCode ( string $code ) : PHPRtfLite_Element
$code string
리턴 PHPRtfLite_Element

writeRtfCode() 공개 메소드

adds element with rtf code directly (no converting will be made by PHPRtfLite)
public writeRtfCode ( string $code, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element
$code string
$font PHPRtfLite_Font
$parFormat PHPRtfLite_ParFormat
리턴 PHPRtfLite_Element

writeText() 공개 메소드

writes text to container.
public writeText ( string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element
$text string Text. Also you can use html style tags. Possible tags:
strong, b- bold;
em - ;
i - italic;
u - underline;
br - line break;
chdate - current date;
chdpl - current date in long format;
chdpa - current date in abbreviated format;
chtime - current time;
chpgn, pagenum - page number ;
tab - tab sectnum - section number;
line - line break;
page - page break;
sect - section break;
$font PHPRtfLite_Font font of text
$parFormat PHPRtfLite_ParFormat paragraph format, if null, text is written in the same paragraph.
$convertTagsToRtf boolean if false, then html style tags are not replaced with rtf code
리턴 PHPRtfLite_Element

프로퍼티 상세

$_elements 보호되어 있는 프로퍼티

protected PHPRtfLite_Table_Cell[]|PHPRtfLite_Element[]|PHPRtfLite_Image[]|PHPRtfLite_FormField[] $_elements
리턴 PHPRtfLite_Table_Cell[] | PHPRtfLite_Element[] | PHPRtfLite_Image[] | PHPRtfLite_FormField[]

$_pard 보호되어 있는 프로퍼티

protected string $_pard
리턴 string

$_rtf 보호되어 있는 프로퍼티

protected PHPRtfLite $_rtf
리턴 PHPRtfLite