I've tried to create a login widget that can be included at will in any action that is outside the content of the application that requires login. My thought here was that I wanted a DRY-approach for rendering the login box with any error messages from a previous login attempt. To enable this I utilized the FlashMessenger for saving the ...
Hi,
I'm currently using the Zend_Db class to manage my database connections.
I had a few questions about it.
Does it manage opening connections smartly? (eg, I have a connection already open, does it know to take use of it - or do I have to constantly check if theres' already an open connection before I open a new one?)
I use the foll...
I've worked with AMFPHP for a while, but with Adobe supporting ZendAMF, I was wondering if I should migrate.
One of the major disadvantages for AMFPHP is that class mappings need to be public, so not only does that mean public members on the PHP side, but also on the Flex side. I was wondering if it is the same case for ZendAMF.
...
I'm interested in using Doctrine as an ORM for a new Zend Framework app I'm writing. I'm trying to figure out the best way to integrate it as straightforward as possible. Every example I find is different, and a lot of them pre-date the new autoloading features in ZF 1.8. None of them have worked for me yet.
Does anyone have a good way ...
I'm trying to use modules in the ZF 1.8 project but can't get working routing to modules' actions.
Here is an example, I create route "/test" that points to module 'test', controller 'ttt' and action 'index':
$router->addRoute(
$name,
new Zend_Controller_Router_Route('test',
array('controller' => 'ttt',
'mo...
Hi -
I currently use Zend_Db to manage my queries.
I've written already code that preforms queries like the one below:
$handle->select()->from('user_id')
->where('first_name=?', $id)
->where('last_name=?', $lname)
I've done this without sanitizing the input, assuming Zend_Db will. Does Zend do th...
In our application, the backend is accessed via Zend_XmlRpc. In the backend, I'm using Zend_Http_Client together with Zend_Http_Client_Adapter_Curl to connect to another web service over HTTPS.
During unit tests, everything works as expected and the remote service is accessible. But when the frontend connects via Zend_XmlRpc to the back...
I'm using the default framework code that was created with the Zend Framework Application tool, I added some autoloader magic so that any classes named Default_<*>_<*> would automatically be loaded from the correct directory, in this case Default_Model_TableName.
application/models/ProjectCategories.php:
<?php
class Default_Model_Proj...
I have a view and I want to display data that would be generated by othe modules and controllers on the page.
What is the best way to do this?
For example: If on a certain page I want to pull in the latest news from the news module.
...
I have in my bootstrap
public function initRoutes()
{
$router = new Zend_Controller_Router_Rewrite();
$route = new Zend_Controller_Router_Route_Static('register', array('module'=>'members','controller'=>'register','action'=>'index'));
$router->addRoute('register',$route);
}
and when I go to http://domain.com/register
I ge...
I would like to wrap form elements with labels as such
<label for="email">E-mail <input type="text" name="email" id="email" /></label>
The only option I could find is to alter the placement; however it only accepts 'prepend' and 'append':
<!-- prepend -->
<label for="email">E-mail</label> <input type="text" name="email" id="email" />...
Hi
I'm validating allot of fields now in PHP, and I have to preform basic (string length ect.) and more complex (strip <> tags, for example)
Can anyone recommend a class that does this, or maybe a framework, or maybe some functions that do these things?
...
I am having a serious problem converting my 'select' statement into something that will work with the zend paginator... could someone have a crack at it, as I am having no luck...
Here is my query:
$query = "SELECT
user_id, name, gender, city, province, country, image_id, one_liner, self_description, reputation
FROM
...
Given my generic select below, is there a way to get the number of records returned from a query with Zend Framework? $row++ in a loop is not acceptable for my solution as I am using paging (though its not in my sample).
I also DO NOT want to add another query with "Count(*)".
$query = "Select * from Users where active = 1";
$stmt = $...
I have current PHP codebase written in procedural (mainly) style that our client is using for some time now. What we want is to "strangle" (as in concept Strangler Application) that code and add Zend Framework to enable new development.
What I have now is custom route that routes all "old" HTTP request to one controller (i.e. Strangler ...
At the moment in my ZF project have a URL structure like this:
/news/index/news_page/1/blog_page/2
When I generate my pagination I use the URL helper as follows:
<?php echo $this->url(array('blog_page'=>3)); ?>
Which generates a URL like this:
/news/index/news_page/1/blog_page/3
What I'd like to do is use a custom route to have ...
Hi,
I have a a strange problem that I can't seem to identify the cause of.
When I use Zend_Currency to format a value to to GBP I get an accented A before the £ symbol. If ask it to return any other curreny such as USD the accented A disappears.
The code that is generating this is:
$currency = new Zend_Currency('en_GB');
$amount = $...
I am experimenting with the Zend_Validate_Between class.
I set it up thusly:
$scoreBetweenValidator = new Zend_Validate_Between(-3, 3, true);
so the validator should only accept values between -3 and 3, inclusive.
On an invalid value I got a '%value%' was not found in the haystack error message, which I think belongs to the Zend_Val...
hi all,
i want to set my action controller from within a hidden filed in my view script form and when my form submitted zend framework router diagnose the action.
like this:
...
I'm trying to make some ajax-functionality in my web application, but I cannot get all puzzle pieces to fit:
I want to add a link that, when clicked upon, will open a new input (text) field that can be filled by the user. In the back-end, I want to do some administration that the link is clicked.
I want to do according to the Zend Fram...