mixed) $options */ public function __construct( array $options = array() ) { $this->hyphenator = new ezcDocumentPdfDefaultHyphenator(); $this->tokenizer = new ezcDocumentPdfDefaultTokenizer(); $this->tableColumnWidthCalculator = new ezcDocumentPdfDefaultTableColumnWidthCalculator(); $this->compress = false; $this->permissions = -1; $this->ownerPassword = null; $this->userPassword = null; $this->properties['driver'] = null; 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 'compress': if ( !is_bool( $value ) ) { throw new ezcBaseValueException( $name, $value, 'bool' ); } $this->properties[$name] = $value; break; case 'ownerPassword': case 'userPassword': if ( !is_string( $value ) && !is_null( $value ) ) { throw new ezcBaseValueException( $name, $value, 'string OR null' ); } if ( ( $name === 'userPassword' ) && ( $value !== null ) && ( $this->properties['ownerPassword'] === null ) ) { throw new ezcBaseValueException( $name, $value, 'ownerPassword must be specified, before a userPassword can be set.' ); } $this->properties[$name] = $value; break; case 'permissions': if ( !is_int( $value ) ) { throw new ezcBaseValueException( $name, $value, 'Vitwise combination of ezcDocumentPdfOptions::EDIT, ezcDocumentPdfOptions::PRINTABLE, ezcDocumentPdfOptions::MODIFY, ezcDocumentPdfOptions::COPY' ); } $this->properties[$name] = (int) $value; break; default: parent::__set( $name, $value ); } } } ?>