zend-framework

Apache - "dynamic" rewrite rule

Hi there. I'm working on a Zend Framework project where I've stumbled across a bit of a problem. The problem originates from the fact that modules are 2nd class citizens in Zend Framework. In my project, I'd like for each module to have a folder containing files which are to be accessed from the outside - files such as stylesheets, java...

Google Spreadsheet API problem: memory exceeded

Hi guys, Don't know if anyone has experience with the Google Spreadsheets API or the Zend_GData classes but it's worth a go: When I try to insert a value in a 750 row spreadsheet, it takes ages and then throws an error that my memory limit (which is 128 MB!) was exceeded. I also got this when querying all records of this spreadsheet bu...

create tag block in zend

Hi How can I define and use in my phtml file custom tag block like this: '' '' for example this tag create the list of all entries and show the title of them? ...

Zend_Controller_Action_Exception from preDispatch()

How to I redirect to 404 page ("page not found") at preDispatch? Normally within action I can simply write: throw new Zend_Controller_Action_Exception('Page is not found!', 404); And it forwards to the appropriate page. How do I make it work for preDispatch? ...

Zend Framework Form Element Validators - validate a field even if not required

Is there a way to get a validator to fire even if the form element isn't required? I have a form where I want to validate the contents of a texbox (make sure not empty) if the value of another form element, which is a couple of radio buttons, has a specific value selected. Right now I'm doing this by overriding the isValid() function o...

Magento resource model for table with compound primary key

I am creating a custom module for a Magento ecommerce site, and the module will center around a new (ie, custom) table that has a compound/composite primary key, or rather the table has two columns that make up the primary key. Does anybody know how to create your models/resource models based on a table with a compound key? To give a f...

Zend Tutorial for newcomers

Is there any good tutorial for zend except the official zend tutorial at http://framework.zend.com/manual/en/. The zend official tutorial is very scattered and not very much helpful for newcomers. ...

Set a different errorhandler depending on module - Zend Framework

Hi I have a few modules, one is an API. I want to set a different ErrorHandler for this API module. Because when the default ErrorHandler is fired it uses the default module with the default layout, which contains HTML. Which is something I do not want my API to be returning. I have looked on here and at the Zend Docs and have not co...

zend framework problem

i want to install zend framework,i set my virtual hosts as the following : Windows host setup : 127.0.0.6 nolanalg xampp virtual host setup (httpd-vhosts.conf) : NameVirtualHost 127.0.0.6 <VirtualHost 127.0.0.6> DocumentRoot "C:/xampp/htdocs/nolanalg/public/" ServerName nolanalg </VirtualHost> but i got an error! it shows me this...

how to create model based Acl

hello all if we have some modules in our application how we could create Model based ACL by zend framework for each models? thanks ...

How to use parametrized nested queries in ZF?

This is the code in ZF (simplification of a real problem): <?php $nested = $table->select() ->where('name = :var') ->bind(array('var' => 'my value')); $select = $table->select() ->join(array('nested' => $nested), 'nested.id = id', array()); $table->fetchAll($select); The variable :var is not "bind-ed" in this scenario. What am I...

Question creating PDF document in Zend Framework

I need to take a ZF rendered view and create a PDF that should look pretty much exactly the same, and email it. The major issue I have right now is getting the HTML created by the view into a string that I can then process with the Zend_PDF::parse method. The view I need to turn into a PDF is the result of a posted form. I've tried gra...

List Contacts from a group from Zend GData

Hi, and thanks for reading. My problem is that I'm trying to get a list of contacts belonging to a group in GData using Zend_Gdata_Query. Using $query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/default/full/?group=http://www.google.com/m8/feeds/groups/xxx...xxx/base/XXX'); $feed = $gdata->getFeed($query); give m...

Why is Zend Framework (Zend_Db_table) rejecting this SQL Query?

I'm working on a simple JOIN of two tables (urls and companies). I am using this query call: print $this->_db->select()->from(array('u' => 'urls'), array('id', 'url', 'company_id')) ->join(array('c' => 'companies'), 'u.company_id = c.id'); whic...

Webkit and Excel file(PHPexcel)

I have an excel file which can be downloaded..for example NAME.xlsx well it works in firefox but in webkit(safari/chrome) it appends to the name also the extension .xhtml so then name it will be NAME.xlsx.html it should be ONLY .xlsx Here you have my headers: $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); ...

FlashBuilder 4 and Zend Framework error

I am trying to use adobe flash builder 4 with a php service. I had it set up an older macbook running leopard, but just tried to set it up on my new laptop running snow leopard. I did all the same steps.. set the Flex Server to be PHP, set the web root and url. Then I go to Data->Connect To PHP and point it to a php file I have in my ...

Zend Routing:: How I can send all request that going to application-> IndexController to application->module->store->IndexController

Hi, How I can send all request in zend project to my default module controller (without use .access files). Now it going to application->IndexController, Instead I need that every request will go to application->module->store->IndexController. I try this: public function indexAction() { $this->_forward('index','index','store')...

using partials in view helpers

Creating custom Zend View helpers I often end up with something like: // logic here if ($condition) { $output = <<<EOS... } else { $output = <<<EOS... } or using switch. Then to eliminate this, I create setPartial(), getPartial() and htmlize() for using external .phtml's. This is not the best solution, because partials do no...

Zend Form not in place labbels values, how to move them that they will be exactly above text box?

Hi, I have esthetic's problem. Zend Form not in place label value, how to move them that they will be exactly above text box, and not from left? (I didn't put filters and validation to make this code simpler here) My Code Login.php form: public function init() { $username = new Zend_Form_Element_Text('username'); $username->setLab...

url to http request object

I need to convert string like this: $url = 'module/controller/action/param1/param1value/paramX/paramXvalue'; to url regarding current router (including translation and so on). Usually I generate the target urls using url view helper, but for this I need to specify all params, so I would need to manually explode the string. I tried to...