Similar to my last post about Zend_Mail S/MIME class, this one allows to digitally sign and even add TSA (timestamping) support to your PDF documents generated using Zend_Pdf. There is a standalone ASN1 parser included that can be used for other projects that require ASN1 data interchange. See https://en.wikipedia.org/wiki/PAdES , https://www.ietf.org/rfc/rfc3161.txt for reference. The challenge was to add the BytesRange element with right byte bounds of the…
Category: Zend Framework
Performing authentication in custom validator in ZF
Although, this is not a good approach to use more than one value in Zend_Validate, but it may be useful sometimes if you want to write your custom validator and add it to let’s say password field and use it as other validators in Zend_Form. So $password->setRequired(true) ->setLabel(’Password’) ->addFilter(new Zend_Filter_StringTrim()) ->addValidator(new My_Custom_Password_Validator());
Zend_Dom_Query::loadHTML() problems with UTF-8
in order to prevent damaging charset while usnig Zend_Dom_Query please see the hack below. It happens that you experience wrong characters even if the document is UTF-8 and you specified this encoding when you creted your Zend_Dom_Query instance. The problem is in Zend_Dom_Query::queryXpath() method on line $domDoc->loadHTML($document);