function __construct($contextType) { parent::__construct(); switch ($contextType) { case 'ZendPdf': $this->context = new ZendPdfContext(); break; default: trigger_error("unhandled context type specified: {$contextType}"); break; } }