AW: [fw-general] Subclassing Zend_View and instancing in initView();

2007-08-31 Thread Leo Büttiker
Hi Joshua, There's a way! The hole Zend MVC is sometimes a bit hard to understand (I had a pretty hard time to get into it). I think you can do in you bootstrap like this: $view = new Trevi_View(); $viewRenderer = new Trevi_Controller_Helper_ViewRenderer();

Re: [fw-general] Subclassing Zend_View and instancing in initView();

2007-08-31 Thread Tobias Gies
thats right. Simply tell the viewRenderer that you want to use another view. You actually do not even need to subclass it, I'd assume Leo has some own functionality in there. After doing what he wrote, you also need to register the viewRenderer in the helperBroker to use it. 2007/8/31, Leo

[fw-general] How to generate a good cache identifier based on URL?

2007-08-31 Thread Peter Van Dijck
Hi all, I am using a caching identifier based on the URL. But I'm getting strange effects: when accessing a URL I see the cached version of *another* page. This is the code I'm using for the cache identifier. $cache_identifier = ereg_replace(/, _, $_SERVER['REQUEST_URI']); $cache_identifier =

[fw-general] Problem storing ACL in registry

2007-08-31 Thread Jack Sleight
Hi, I doubt this problem specifically relates to the ACL, or the registry, but when I try to add my ACL (which is only small; only contains 10 or so rules) to the registry I get the Allowed memory size of 16777216 bytes exhausted error. I tried to increase the memory size to 32mb, and now I

Re: [fw-general] How to generate a good cache identifier based on URL?

2007-08-31 Thread Sebastian Krebs
Peter Van Dijck schrieb: Hi all, I am using a caching identifier based on the URL. But I'm getting strange effects: when accessing a URL I see the cached version of *another* page. This is the code I'm using for the cache identifier. $cache_identifier = ereg_replace(/, _,

RE: [fw-general] How to generate a good cache identifier based on URL?

2007-08-31 Thread Steven Brown
Here's what worked for me: $cacheName = $_SERVER['REQUEST_URI']; $cacheName = preg_replace('/[^a-zA-Z0-9]/', '__', $cacheName); if(!($output = $cache-load($cacheName))) { You need to strip out all the other junk because the cache identifier is used in the file name. I used __ because the URI

Re: [fw-general] How to generate a good cache identifier based on URL?

2007-08-31 Thread Federico Galassi
On 31/ago/07, at 10:17:51, Peter Van Dijck wrote: Any thoughts on how to improve this would be very welcome :) $cache_identifier = md5($_SERVER['REQUEST_URI']); Federico

RE: [fw-general] How to generate a good cache identifier based on URL?

2007-08-31 Thread Steven Brown
Good one! -Original Message- From: Federico Galassi [mailto:[EMAIL PROTECTED] On Behalf Of Federico Galassi Sent: Friday, 31 August 2007 9:50 PM To: Peter Van Dijck Cc: fw-general@lists.zend.com Subject: Re: [fw-general] How to generate a good cache identifier based on URL? On 31/ago/07,

RE: [fw-general] Extracting data out of PDF with Zend_Pdf?

2007-08-31 Thread Alexander Veremyev
Hi Markus, Yes, that looks it's done :) Historically PDF Info structure is used for storing Title, Author, Subject, etc. Since PDF 1.4 Metadata streams may also be used for this. Metadata streams may contain much more info. I saw somewhere in the documentation (I don't remember exactly where),

RE: [fw-general] Extracting data out of PDF with Zend_Pdf?

2007-08-31 Thread Alexander Veremyev
Zend_Pdf preloads PDF objects reference tables and pages. Both operations take enough time and memory. I think pages loading may be omitted for some cases and it may save a lot of resources, but it should be tested. Could I ask you to do this? :) (It looks you have a good set of real world PDF

Re: [fw-general] How to generate a good cache identifier based on URL?

2007-08-31 Thread David Koblas
I would point out that it's a _bad_ design to have Zend_Cache_Core make this assertion. This restriction makes it impossible to interoperate the cache with other systems that don't have a similar restriction on ID space. It would be better if this was left to the Backend implementation to

Re: [fw-general] Extracting data out of PDF with Zend_Pdf?

2007-08-31 Thread Markus Fischer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Alexander Veremyev wrote: Zend_Pdf preloads PDF objects reference tables and pages. Both operations take enough time and memory. I think pages loading may be omitted for some cases and it may save a lot of resources, but it should be

[fw-general] Problems encoding ZF with Zend Guard

2007-08-31 Thread Thomas Weidner
Hy fellows, I have problems encoding ZF. Initialising my view within the controller causes an PHP_ERROR when using an encoded version. My controller code: public function init() { $this-_redirector = $this-_helper-getHelper('Redirector'); } This causes the helperbroker to fail

[fw-general] need help with simple authentication plugin (how to redirect to another :model :controller :action?)

2007-08-31 Thread Truppe Steven
i'm on writing a simple Zend_AclZend_Auth Plugin that checks in preDispatch() if there are any rules for resources related to the actual module/controller/action. this all works fine, my question now is how can i forward to the controller:admin action:login if i find that the current user needs

RE: [fw-general] Extracting data out of PDF with Zend_Pdf?

2007-08-31 Thread Alexander Veremyev
Hi Markus, Great thanks for the testing! That looks it would be a good feature to have info only PDF loading mode. Number of document pages is calculated dinamically now. Pages structure is usually a tree with pages at leafs. So it's necessary to load each tree element to check if it's a page

RE: RE: [fw-general] Zend_Search_Lucene - Fatal error when I try to load it

2007-08-31 Thread Juan Felipe Alvarez Saldarriaga
I try to follow the example into the framework reference guide, so this is my code now: foreach ( $arrItemsData AS $intItemId = $arrItemData ) { try { if ( false === is_dir( LUCENE_INDEX_PATH . /{$arrItemData['identifier']} ) ) { mkdir( LUCENE_INDEX_PATH .

[fw-general] custom route problem

2007-08-31 Thread Gunter Sammet
Hi all: I have following custom route: $router = $frontController-getRouter(); $browseRoute = new Zend_Controller_Router_Route( '/:action/:detailPage', // URL to match; action and id will be matched array( 'module' =