My application setup with 2 modules admin and default
I test the controller which works fine on modules
but the models doesnt work
I created a model application\modules\admin\models\User.php
<?php
class Admin_Model_User{
}
inside the controller
$user = new Admin_Model_User();
Fatal error: Class 'Admin_Model_User'
not found...
Hi,
I am trying to write a XML file with Zend_Config_Writer_Xml. I found out a problem that I can't write multiple items under a root. I would like to do,
<root>
<item name="test"></item>
<item name="test2"></item>
</root>
I can't find a method to do this on zend documentation.
Please advise me.
...
I dont know why this particular bit of code is simply not updating despite using this style of coding elsewhere succesfully.No exception is being thrown.
CREATE TABLE `accounts` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`accounts_username` varchar(60) DEFAULT NULL,
`accounts_fullname` varchar(600) DEFAULT NULL,
`accounts_email`...
I need to decorate to Zend_Form_Element_MultiCheckbox into a unordered list, I can get each item surround by , by setting setSeparator to '' and the HtmlTag tag to li
I just get find anything to set the around this list, anyone able to point me in the right direction?
Thanks for reading (My code is below)
$interests = new Zend_Form_E...
hi,
I need to make something like google-analytics, I mean that it has to be very simple to install and enables a comunication between 2 websites.
Let me explain the idea.
I'm developping an application (with ZF) where my clients will be online shops, OSCommerce only at the begining. Those shops need to get some info from my app's datab...
Hello,
I created a MVC with Zend by reading http://framework.zend.com/manual/en/zend.controller.modular.html.
The problem is that I can't find a way to use Zend_ACL with modular structure. Zend_Acl simply does not have a method to add modules. It only allows me to add controller and action.
How do I use Zend_Acl with modular structru...
Has anyone way around this bug?
echo json_encode(array('url'=>'/foo/bar'));
{"url":"\/foo\/bar"}
I use Zend_Json and Zend_Json_Expr so I can get even callback functions inside my js object -- but I can't get a url to come out in a usable format!
echo Zend_Json::encode(array(
'url'=>new Zend_Json_Expr('/foo/ba...
Hi
Is it possible search accented text with Zend_Search_Lucene? I indexed accented text but the search doesn't find it.
A roundabout solution can be that I deaccent the text before indexing and also deaccent the query string. But it doesn't seam to be an elegant solution.
Any idea?
...
I'm just wondering what the syntax is to do a db select in Zend Framework where two values are true. Example: I want to find if a user is already a member of a group:
$userId = 1;
$groupId = 2;
$db = Zend_Db_Table::getDefaultAdapter();
$select = new Zend_Db_Select($db);
$select->from('group_members')
->where('user_id = ?', $userId);...
Hello guys,
I've been trying to figure this out these days. I got a problem when I want to add 'page' parameter in my URL for my pagination.
This is my router
->addRoute('budi',new Zend_Controller_Router_Route(':lang/budi',array('controller' => 'budi', 'action' => 'index', 'page' => 1), array('lang'=>$s, 'page' => '\d+')))
...
Normally, this would work for me:
$db = Zend_Db_Table::getDefaultAdapter();
$where = $db->quoteInto('id = ?', $id);
$db->delete('tablename', $where);
but I have to match two ids. So I don't really know how to structure it.
WHERE first_id = 'id1' AND second_id = 'id2'
So how do I do this with the Zend Framework?
...
I inherited a Zend project devoid of comments and I didn't get to talk to the previous developer. Since I have no Zend experience I'm having some issues :)
I'd like to print out some variables inside an function that indexes items from the site using Zend_Search_Lucene because I think something is going wrong here.
From what I've read...
I'm creating a web application that will involve habitual file uploading and retrieval (PDFs, Word Documents, etc).
Here are the requirements:
need to be able to link to them in my view script so a user can download the files.
files should not be accessible to users who are not logged in.
Question #1: Where should I store these file...
How would I write this sql the Zend Framwork way?
UPDATE register
SET balance = (balance + 10)
WHERE added_date > 1259944184 ;
I can't find any examples of this on Zends website or the web.
Do I need to use "Zend_Db_Expr" ?
thanks
...
Hi,
I'm using a configuration file to route my requests in my application. I have the following entries:
routes.deal.route = "deal/:id/*"
routes.deal.defaults.controller = "deal"
routes.deal.defaults.action = "index"
routes.deal.reqs.id = "\d+"
routes.deal.route = "deal/buy/:id/*"
routes.deal.defaults.controller = "deal"
routes.d...
Hello, how could I add some variables to my layout.phtml?
I could add it in every Controller like here: http://stackoverflow.com/questions/1537700/sending-variables-to-the-layout-in-zend-framework
But that's not really suggestive and in the Bootstrap I don't want to add it too.
...
I want to display a page that has 2 forms. The top form is unique to this page, but the bottom form can already be rendered from a different controller. I'm using the following code to call the action of the other form but keep getting this error:
"Message: id is not specified"
#0 .../library/Zend/Controller/Router/Rewrite.php(441):...
Hello, how could I add a "reload captcha"-feature?
How I could change the image element with JavaScript I know, but how should I manage that with the ZF? I generate the captcha with Zend_Form_Element_Captcha as an Image.
...
I am working with Urls in the following format: "controller/action" where the slash is required.
I need to create a PCRE regex to match the controller and action names unless the controller name has the value of "home." For example:
"member/update" should produce "member", "update"
"admin/index" should produce "admin", "index"
"home/i...
Could there appear some problems if I serialize a with Zend_Form created form and does this help much in view of the performance?
...