mixed) $options */ public function __construct( array $options = array() ) { $this->errorReporting = 15; // E_PARSE | E_ERROR | E_WARNING | E_NOTICE $this->hyphenator = new ezcDocumentPdfDefaultHyphenator(); $this->tokenizer = new ezcDocumentPdfDefaultTokenizer(); $this->tableColumnWidthCalculator = new ezcDocumentPdfDefaultTableColumnWidthCalculator(); // @TODO: There might be a better default: $this->driver = new ezcDocumentPdfHaruDriver(); parent::__construct( $options ); } /** * Sets the option $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property $name is not defined * @throws ezcBaseValueException * if $value is not correct for the property $name * @param string $name * @param mixed $value * @ignore */ public function __set( $name, $value ) { switch ( $name ) { case 'hyphenator': if ( !$value instanceof ezcDocumentPdfHyphenator ) { throw new ezcBaseValueException( $name, $value, 'instanceof ezcDocumentPdfHyphenator' ); } $this->properties[$name] = $value; break; case 'tokenizer': if ( !$value instanceof ezcDocumentPdfTokenizer ) { throw new ezcBaseValueException( $name, $value, 'instanceof ezcDocumentPdfTokenizer' ); } $this->properties[$name] = $value; break; case 'driver': if ( !$value instanceof ezcDocumentPdfDriver ) { throw new ezcBaseValueException( $name, $value, 'instanceof ezcDocumentPdfDriver' ); } $this->properties[$name] = $value; break; case 'tableColumnWidthCalculator': if ( !$value instanceof ezcDocumentPdfTableColumnWidthCalculator ) { throw new ezcBaseValueException( $name, $value, 'instanceof ezcDocumentPdfTableColumnWidthCalculator' ); } $this->properties[$name] = $value; break; case 'errorReporting': if ( !is_int( $value ) || ( ( $value & E_PARSE ) === 0 ) ) { throw new ezcBaseValueException( $name, $value, 'int & E_PARSE' ); } $this->properties[$name] = $value; break; default: parent::__set( $name, $value ); } } } ?>