zend-framework

Zend: wrap FormErrors with user-defined html tags

梦想的初衷 提交于 2020-01-03 05:20:11
问题 Zend talk.By default,using the FormErrors decorator the generated list of errors has the following markup: <ul class="form-errors> <li> <b>[element label or name]</b> <ul> <li>[error message]</li> <li>[error message]</li> </ul> </li> </ul> Question: How can I use the following structure instead? <span class='myErrors'> •[error message]</br> </span> Update: I tried with: array('FormErrors', array( 'markupListStart' => "<span class='myErrors'>", 'markupListEnd' => '</span>',

How to add button or images to dojo grid

北战南征 提交于 2020-01-03 04:21:29
问题 I have a dojo grid with a json datastore (mysql resultset converted into json format). Currently my grid show 5 columns as shown below in the figure: I have column named 'Action'. The rows under this 'Action' column should contain buttons or images(edit icon, delete icon) with hyperlinks such as edit.php?id=1 for edit, or delete.php?id=1 for delete. Here is my dojo grid code: <span dojoType="dojo.data.ItemFileReadStore" data-dojo-id="studentsStore" url="http://localhost/newsmis/public

SOAP - nillable=“true”

对着背影说爱祢 提交于 2020-01-03 03:38:10
问题 I am building a web service using the Zend Framework. I am using the Zend_Soap_AutoDiscover class for the generation of my WSDL. I am using various complex type in this web service form example: StockItemEntity Class class StockItemEntity { /** @var string */ public $sStockCode; /** @var string */ public $sQty; public function __construct($sStockCode, $sQty){ $this->sStockCode = $sStockCode; $this->sQty = $sQty; } } WSDL Definition <xsd:complexType name="StockItemEntity"> <xsd:all> <xsd

How setCredentialTreatment works in Zend framework

試著忘記壹切 提交于 2020-01-03 03:35:07
问题 Can anyone tell me what is the use of following statement and how it works in Zend Framework? setCredentialTreatment('SHA1(CONCAT(?, salt ))'); 回答1: Try like this: $auth = Zend_Auth::getInstance(); $authAdapter = new Zend_Auth_Adapter_DbTable( Zend_Db_Table::getDefaultAdapter(), 'users', 'username', 'password', "CONCAT('$this->_salt', sha(?))" ); $authAdapter->setIdentity($username) ->setCredential($password); 回答2: setCredentialTreatment tells the auth adapter how to check the user supplied

Zend Acl - is it possible for an assertion to allow access to a privilege when the acl rules return false?

∥☆過路亽.° 提交于 2020-01-03 02:59:25
问题 By default, returning false in an assertion denies access even when the acl rules allow it. What I want to do is the other way round - i.e. return true in an assertion to allow access when the acl rules deny it. For example: class TestAssert implements Zend_Acl_Assert_Interface { public function assert(Zend_Acl $acl, Zend_Acl_Role_Interface $role = null, Zend_Acl_Resource_Interface $resource = null, $privilege = null) { return true; } } $acl = new Zend_Acl; $acl->addResource('page'); $acl-

Zend Acl - is it possible for an assertion to allow access to a privilege when the acl rules return false?

梦想与她 提交于 2020-01-03 02:59:07
问题 By default, returning false in an assertion denies access even when the acl rules allow it. What I want to do is the other way round - i.e. return true in an assertion to allow access when the acl rules deny it. For example: class TestAssert implements Zend_Acl_Assert_Interface { public function assert(Zend_Acl $acl, Zend_Acl_Role_Interface $role = null, Zend_Acl_Resource_Interface $resource = null, $privilege = null) { return true; } } $acl = new Zend_Acl; $acl->addResource('page'); $acl-

best approach to render site-wide elements using Zend Framework

霸气de小男生 提交于 2020-01-02 17:46:29
问题 I'm using the 'modules' front controller resource for the project setup. What's the best approach to render site-wide elements, like navigation? Add the action which renders the element to the end of the action stack each request? is it OK to render these elements through controller actions? Create a plugin which renders the element? Could I use module specific plugins? are there other possible ways to do this? 回答1: I think the action stack should be avoided. See this article for why. The

ZF: Disable Resource Plugin in application.ini

徘徊边缘 提交于 2020-01-02 16:18:49
问题 How can I disable cache in the cli enviroment? Reason being, the system user that executes the script is not allowed to write to the cache directory, thus the script is unable to execute. In my application.ini I have [production] resources.cachemanager.database.frontend.name = Core resources.cachemanager.database.frontend.customFrontendNaming = false resources.cachemanager.database.frontend.options.lifetime = 7200 resources.cachemanager.database.frontend.options.automatic_serialization = true

Zend Framework and Couch DB

穿精又带淫゛_ 提交于 2020-01-02 10:22:46
问题 Does Zend Framework has native Couch DB support? I found only Zend_Couch by Matthew Weier O'Phinney. http://framework.zend.com/wiki/display/ZFPROP/Zend_Couch+-+Matthew+Weier+O'Phinney Thank you. 回答1: Not yet. The proposal is Ready for Review, so it likely end up in ZF sooner or later. You can either wait or use PHPillow 回答2: Nope, but there are a few libraries available out there already. I personally like http://www.saggingcouch.com because it's simple and light weight (disclaimer: I

ZFdebug Jquery interference

筅森魡賤 提交于 2020-01-02 10:18:32
问题 I use Zend Framework with ZfDebug (http://code.google.com/p/zfdebug/) and a plugin Base64 Encode/Decode. (http://plugins.jquery.com/project/base64) the problem is when i try to make: $(document).ready(function(){ $('#submit').click(function(e){ e.preventDefault(); data = $.base64Encode("something"); alert(data); }); }); an error shows up: $.base64Encode is not a function If in source is loaded the ZfDebug include scripts #ZFDebug_debug { font: 11px/1.4em Lucida Grande, Lucida Sans Unicode,