[fw-general] Zend_Dom iterate all texts

2009-11-20 Thread admirau
How to use Zend_Dom to iterate all the text nodes? I tried like this: $dom = new Zend_Dom_Query($html); $results = $dom->query('*'); foreach ($results as $result) { var_dump($result->textContent); } But this returns texts with childnodes text, not the texts one by one. Actually, I'm tryin

Re: [fw-general] Zend_Locale

2009-10-29 Thread admirau
Ed Lazor-3 wrote: > > Hi, > > I'm trying to clean up my bootstrap. Is there a way to move these > lines to application.ini? > > setlocale(LC_ALL, 'en_US.utf8'); > Zend_Locale::setDefault('en'); > > I read through the manual and it looks like this is required in the > bootstrap, but I'd like

Re: [fw-general] Autoload Doctrine Models

2009-10-19 Thread admirau
Svetlin Petrov wrote: > > Hi, > Hope this will help: > http://weierophinney.net/matthew/archives/220-Autoloading-Doctrine-and-Doctrine-entities-from-Zend-Framework.html > > > Reg

[fw-general] Autoload Doctrine Models

2009-10-17 Thread admirau
How to autoload Doctrine models? My application structure looks like this: /application/ /application/models/ Booking.php /application/models/generated/ /application/models/generated/ BaseBooking.php These two model files are: // Bookind.php class Booking extends BaseBooking {} // BaseBooking

[fw-general] Auto escape all variables in View

2009-10-08 Thread admirau
Has anyone here already created custom View, which escapes all variables by default? Willing to share? -- regards takeshin -- View this message in context: http://www.nabble.com/Auto-escape-all-variables-in-View-tp25803270p25803270.html Sent from the Zend Framework mailing list archive at Nab

[fw-general] Doctrine extensions and ZF

2009-09-27 Thread admirau
Did anyone managed to use Doctrine extensions (e.g. Taggable) with ZF? Where should I put Extension files? How to configure autoloader? Now I'm using dir structure like this: /library/ /library/Zend/ /library/Doctrine/ /library/Doctrine.php /library/Doctrine/Extensions/Taggable/ /library/Doctrin

[fw-general] zend_feed: get n entries by getXpath

2009-09-26 Thread admirau
How to use Zend_Feed::getXpath() method, to limit feed entries just to five newest entries? -- regards takeshin -- View this message in context: http://www.nabble.com/zend_feed%3A-get-n-entries-by-getXpath-tp25623791p25623791.html Sent from the Zend Framework mailing list archive at Nabble.com

Re: [fw-general] Zend_Nav how to set an id to elements

2009-09-10 Thread admirau
Mike974 wrote: > > > For now just the problem I can't set an id for elements, is there any > way to do it ? > > Look at the docs for Zend View Helper Navigation, http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.navigation and then use renderPartial()

Re: [fw-general] Zend_Navigation id attribute

2009-09-10 Thread admirau
Daniel Latter-2 wrote: > > What about the params key? > > 'params' => array('id' => 'value') > And where should I put this? As an option for renderMenu() does not work. -- regards takeshin -- View this message in context: http://www.nabble.com/Zend_Navigation-id-attribute-tp25388415p253

[fw-general] Zend_Navigation id attribute

2009-09-10 Thread admirau
How to set HTML ID attribute for first UL rendered with Zend_Navigation? (for menu view helper). I saw similar problem here, but no answers at all. http://www.nabble.com/Zend_Navigation-Menu-view-helper%2C-need-an-id-for-rendered-UL-td23498604.html -- regards takeshin -- View this message in

Re: [fw-general] sub-subForm not namespaced correctly?

2009-08-23 Thread admirau
admirau wrote: > > When I create a form, add subForm (1), and then a subForm to this subForm > (2), > id attribute of subForm (2) are not prepended with name of subForm(1). > > How to fix that? > I saw there was a similar bug with display groups. > > -- > reg

[fw-general] sub-subForm not namespaced correctly?

2009-08-22 Thread admirau
When I create a form, add subForm (1), and then a subForm to this subForm (2), id attribute of subForm (2) are not prepended with name of subForm(1). How to fix that? I saw there was a similar bug with display groups. -- regards takeshin -- View this message in context: http://www.nabble.com/

[fw-general] Zend_Form save to ini

2009-08-14 Thread admirau
Any chance to convert Zend_Form object to .ini format? How to achieve this? -- regards takeshin -- View this message in context: http://www.nabble.com/Zend_Form-save-to-ini-tp24979523p24979523.html Sent from the Zend Framework mailing list archive at Nabble.com.

Re: [fw-general] ZendX_JQuery regional

2009-08-13 Thread admirau
The best solution I have found so far: // detect language $locale = new Zend_Locale; $lang = $locale->getLanguage(); // change datepicker default language if ('en' !== $lang) { $this->view->JQuery() ->addJavascriptFile('http://j

[fw-general] ZendX_JQuery regional

2009-08-13 Thread admirau
How to enable translation of ZendX_JQuery DatePicker? How to set 'regional' option? I tried setJQueryParams and setOptions, but nothing changes. -- regards takeshin -- View this message in context: http://www.nabble.com/ZendX_JQuery-regional-tp24953515p24953515.html Sent from the Zend Framewor

Re: [fw-general] Zend Navigation - how to render submenus for only active item

2009-08-12 Thread admirau
u.kayani wrote: > > I`m surprised this behavior isn`t supported, it is a pretty common > behavior for menus. > Yea I agree CSS would be easiest just not very efficient. Maybe i`ll look > into a customer view helper. > > According to the other poster there is a way to do it. If there is, could

[fw-general] Zend Navigation renderSubmenu

2009-08-12 Thread admirau
I want to render a main menu (level zero), and then, submenu items if current page has subpages. I thought this should work: navigation()->menu()->setMaxDepth(0); ?> navigation()->menu()->renderSubMenu(); ?> but, if the current page has no sub-pages, submenu renders zero-level items. (both menu

Re: [fw-general] framework.zend.com down??

2009-08-12 Thread admirau
keith Pope-4 wrote: > > Seems to be down for me > Yes, I noticed the problems during last days too. For all the pages in *.zend.com domain. -- regards takeshin -- View this message in context: http://www.nabble.com/framework.zend.com-down---tp24934235p24937665.html Sent from the Zend F

Re: [fw-general] Zend Navigation - how to render submenus for only active item

2009-08-12 Thread admirau
AFAIK there is currently no option supporting this behavior. Custom helper is a good choice. The simplest solution is to hide items which you do not need with CSS. You can also use custom partial to display the menu. -- ragards takeshin u.kayani wrote: > > I`m trying to use Zend Navigation t

Re: [fw-general] Zend Navigation - how to render submenus for only active item

2009-08-12 Thread admirau
AFAIK there is currently no option supporting this behavior. Custom helper is a good choice. The simplest solution is to hide items which you do not need with CSS. You can also use custom partial to display the menu. -- reagards takeshin u.kayani wrote: > > I`m trying to use Zend Navigation

Re: [fw-general] Offline version of the documentation

2009-08-10 Thread admirau
mbneto wrote: > > You can download it from the http://framework.zend.com/download/latest > Thanks, I have missed this version, found only docs for 1.6 version. -- regards takeshin -- View this message in context: http://www.nabble.com/Offline-version-of-the-documentation-tp24887234p24907

Re: [fw-general] Zend Tool errors on Windows after upgrading to 1.9

2009-08-09 Thread admirau
Fix for this bug is described here: http://forums.zend.com/viewtopic.php?f=69&t=1778 -- regards takeshin -- View this message in context: http://www.nabble.com/Zend-Tool-errors-on-Windows-after-upgrading-to-1.9-tp24889972p24895133.html Sent from the Zend Framework mailing list archive at Nabbl

RE: [fw-general] Zend Framework 2.0

2009-08-09 Thread admirau
There's a lot of questions… Will it be 5.3 only? Now PHP 5.3 is still unstable, there is no hostings for 5.3, so… when? I do not want to throw away my libraries which I will write till 2.0 since now, so it would be nice to know what is planned, e.g. previously mentioned stripping require_once's

Re: [fw-general] Zend Tool errors on Windows after upgrading to 1.9

2009-08-09 Thread admirau
forgot to mention, that the project is created, and the profile exists. -- regards takeshin -- View this message in context: http://www.nabble.com/Zend-Tool-errors-on-Windows-after-upgrading-to-1.9-tp24889972p24889977.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Zend Tool errors on Windows after upgrading to 1.9

2009-08-09 Thread admirau
After upgrading to 1.9, zf.bat show version works fine, but all commands with 'create' throws errors like this: >zf create action test An Error Has Occurred A project profile was not found. Zend Framework Command Line Console Tool v1.9.0 Details for action "Create" and pro

[fw-general] Zend Framework 2.0

2009-08-09 Thread admirau
Are there any known plans for ZF 2.0? It will be an 'regular' release? Are planned any 'breaktrough' features (e.g. application backend like in Symfony, ORM)? I'm sure, it will be backwards compatilble, but what can we expect? I've found only this roadmap for Zend_Controller: http://framework.ze

[fw-general] Offline version of the documentation

2009-08-09 Thread admirau
Is there any up to date offline version of the documentation to the ZF? How to obtain one? -- ragards takeshin -- View this message in context: http://www.nabble.com/Offline-version-of-the-documentation-tp24887234p24887234.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] List all modules, controllers or actions

2009-08-03 Thread admirau
Is there any chance to list all modules, controllers or actions used in project, or do I have to parse all the files with regex/reflection? -- regards takeshin -- View this message in context: http://www.nabble.com/List-all-modules%2C-controllers-or-actions-tp24802524p24802524.html Sent from t

[fw-general] Switch application language

2009-08-01 Thread admirau
Which is the best way to switch between application languages? I set up translations in application.ini: resources.translate.data = APPLICATION_PATH"/languages" resources.translate.adapter = "gettext" resources.translate.options.scan = "directory" ;resources.translate.options.disableNotices = t

Re: [fw-general] Multiple containers in navigation application resource

2009-07-29 Thread admirau
tobis wrote: > > I would also like to know this. Is it possible > You may have one navigation in app.ini, and render only part when needed, using something like this: $myMenuContainer = $nav->getOneByLabel('myLabel'); $this->navigation()->menu()->renderMenu($myMenuContainer); (*not teste

Re: [fw-general] Zend_Navigation save to XML

2009-07-23 Thread admirau
DASPRiD wrote: > > It would be helpful when you could provide a dump of the generate > > Yes, this extend was wrong copy/paste. Here is the code: // action body $navigation = new Zend_Navigation(new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation/main.xml', 'main'))

[fw-general] Zend_Navigation custom rendering

2009-07-22 Thread admirau
I'm building navigation menu editor. When I display menu, I want to have additional links (edit, delete, addnew) after each navigation item. I suppose the best solution is to have custom view helper. My new helper My_View_Helper_Navigation_CustomMenu would be basically extension of Zend_View_Hel

[fw-general] Zend_Navigation save to XML

2009-07-22 Thread admirau
How to save Zend_Navigation to XML? I tried like this: $navigation = new Zend_Navigation(new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation/main.xml', 'main')); $config = new Zend_Config($navigation->toArray()); $config->setExtend('main'); $writer = new Zend_Config_Wri

[fw-general] Re: Re[fw-general] moving Require_once

2009-07-05 Thread admirau
Matthew Ratzloff wrote: > > The complete command is therefore: > > % cd path/to/ZendFramework/library > % find . -name '*.php' | grep -v './Loader/Autoloader.php' | \ > xargs sed -E -i~ 's/(require_once)/\/\/ \1/g' > % find . -name '*.php~' | xargs rm -f > Shouldn't this script be part of th

[fw-general] Re[fw-general] quest parameters from within view helper

2009-06-27 Thread admirau
I want my view helper to return unique string based on controller and action. Is it possible to get request parameters from within view helper? In the controller I would write $this->_getParams(); but I don't know how to obtain the same in my view helper. -- regards takeshin -- View this messa

[fw-general] Get Zend_Form_Element validators as array

2009-06-14 Thread admirau
Is there any smart way to retrieve element validators as an array (like in .ini)? I'd like to return validator options as an JSON object to the JavaScript. Most of the properties of Zend_Validate are protected… -- regards takeshin -- View this message in context: http://www.nabble.com/Get-Zen

Re: [fw-general] Internal Server Error using Zend_Feed

2009-06-14 Thread admirau
Customize wrote: > > I have found a tutorial on this http://www.alexatnet.com/node/11 and > moved my logic in the controller accordingly instead of view. Now I am > getting absolutely nothing. Looking at view source gives me > > Transitional//EN"> > > > Howev

[fw-general] Zend_Form display groups from ini file

2009-06-04 Thread admirau
How to define group of form elements (displaygroups) when genering Zend_Form from .ini file? I define elements: ; username element elements.username.type = "text" elements.username.options.label = "login" elements.username.options.validators.alnum.validator = "alnum" elements.username.options.val

[fw-general] Multiple containers in navigation application resource

2009-06-02 Thread admirau
Is there a possibility to have multiple menus constructed via application.ini? Now I do: resources.view[] = resources.navigation.pages.indexFoo.label = "Foo" resources.navigation.pages.indexFoo.controller = "index" resources.navigation.pages.indexFoo.action = "foo" resources.navigation.pages.i

Re: [fw-general] ZF CLI slow

2009-06-01 Thread admirau
Matthew Ratzloff wrote: > > So the obvious next step would be to post your PHP CLI include path. > php -i | grep "include_path" > include_path => c:\users\user\www\library;. => c:\users\user\www\library;. library/ Zend/ Doctrine/ PHPTAL/ I use SET ZEND_TOOL_INCLUDE_PATH_PREPEND=

Re: [fw-general] ZF CLI slow

2009-05-31 Thread admirau
beberlei wrote: > > enable xdebug profiler and see with kcachegrind what took so long. > > my guess is the recursive search for all providers in your includepath is > the > problem. > Output profiler file is 10 MB big… 99.78% percent of time take calls to: Zend_Tool_Framework_Loader_Include

Re: [fw-general] ZF CLI slow

2009-05-31 Thread admirau
tfk wrote: > > > Does running regular php(-cli) is just as slow? If so, I'd run php -m > and disable module after module until you find the offender. > > Thanks. I have already tried that. Disabling all the modules in php.ini does not help. There are left some pre-compiled modules, but I

[fw-general] ZF CLI slow

2009-05-30 Thread admirau
On my computer zf.bat is very slow. Even "zf show version" takes up to 30 seconds. Maybe it is not ZF isuuse but an PHP CLI one, but how to speed it up? Zend library folder is at the beginning of the include_path. I've tried ZEND_TOOL_INCLUDE_PATH but it does not help. (Vista, Apache 2.2 + PHP 5

[fw-general] View script source from variable

2009-05-13 Thread admirau
Hi! How to set view script code from a php string variable instead of .phtml file? e.g. in the controller: $this->view->_renderCode('my .phtml script code'); -- regards takeshin -- View this message in context: http://www.nabble.com/View-script-source-from-variable-tp23535199p23535199.html

Re: [fw-general] RFC: ZendX_Doctrine

2009-05-12 Thread admirau
Matthew Lurz wrote: > > Thanks. Eventually proposals will need to be create and submitted. I think > we need to address some big-picture questions before getting into the > details of any given component. > > > admirau wrote: >> >> Take a look on my approac

Re: [fw-general] RFC: ZendX_Doctrine

2009-05-10 Thread admirau
Jasone wrote: > > I am able, and have the time, to do this. I authored two of those > proposals. Been waiting on the zend team :) > > (Or now that I look, maybe they're not moved to "ready for review" yet?) > > > Jason > > Take a look on my approach: http://wiki.github.com/taat/myzend -

[fw-general] Zend_Application PHPUnit tests

2009-05-09 Thread admirau
Hi! I have created basic project using Zend_Tool. There is a directory /tests/ with empty phpunit.xml and some empty test files. Now I want to test if application is set up correctly. index.php is included automatically because application, include_paths are set up there. But running applicat

Re: [fw-general] Autoload models with no namespace

2009-05-06 Thread admirau
Matthew Lurz wrote: > > While this is the behavior out of the box, Doctrine is flexible. > > Take a look at > http://www.doctrine-project.org/documentation/manual/1_1/en/yaml-schema-files#features-examples:packages > and > http://www.doctrine-project.org/documentation/manual/1_1/en/yaml-schema

[fw-general] Compile to improve performance

2009-05-05 Thread admirau
Doctrine provides nice option to compile most important classes into one big file, stripping comments etc. to reduce server operations. This option for ZF would be nice. Is there any extension to autoloader to log which files are used most? I noticed also that Zend_Tool creates index.php with c

Re: [fw-general] Autoload models with no namespace

2009-05-05 Thread admirau
Matthew Weier O'Phinney-3 wrote: > > > Two primary drawbacks: > > 1. The autoloader can return a false lookup (i.e., not found) earlier > when namespaces are used > > 2. If you use other autoloaders, debugging and error reporting become > more complex > >> Any chance to enable

Re: [fw-general] Autoload models with no namespace

2009-05-05 Thread admirau
Matthew Weier O'Phinney-3 wrote: > > > Tell the autoloader to act as a fallback autoloader. > > Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true); > > Thank you Matthew. That's what I wrote in my first post. I just asked, if this is the best way or are there any drawbacks

Re: [fw-general] Autoload models with no namespace

2009-05-05 Thread admirau
Matthew Weier O'Phinney-3 wrote: > >> >> How to register this "empty" namespace only for this one models >> directory? > > Add the directory to the include_path. Truly, that's the simplest way. > > That said, I'm going to say it once again: you should always namespace > your classes. PHP.net

[fw-general] Autoload models with no namespace

2009-05-05 Thread admirau
Hi! Doctrine generates class for models in /application/models/ The model class are following this scheme // file /application/models/Tablename.php class Tablename {} I register used namespaces in application.ini: autoloadernamespaces.0 = "My" autoloadernamespaces.1 = "Doctrine" But model clas

[fw-general] Re: Re[fw-general] source plugins in custom directory

2009-05-05 Thread admirau
admirau wrote: > > > Is there a chance to tell application where > to look for resources with "My_" prefix > directly from the application.ini config file, > possibly without modifying default index.php? > Solution found on Rob Allen's blog: plugi

[fw-general] Re[fw-general] source plugins in custom directory

2009-05-05 Thread admirau
Hi! I've created view resource plugin: class Zend_Application_Resource_Phptal extends Zend_Application_Resource_ResourceAbstract {} Application is initialized with Zend_Tool defaults: // Create application, bootstrap, and run $application = new Zend_Application( APPLICATION_ENV, APPLICA

Re: [fw-general] Dollar character in Zend_Config key

2009-05-04 Thread admirau
On 2009-05-04 12:04, Vadim Gabriel wrote: Hey, I know that you could use html entities as values, Not sure if that applies for keys as well. There is no need to use entities. If *value* (not key) contains special characters, you just enclose it with double quotes. http://php.net/parse_ini_file

Re: [fw-general] Dollar character in Zend_Config key

2009-05-04 Thread admirau
vince. wrote: > > Hey, > > No, You can't use HTML characters inside the ini file. Use HTML Entities > instead. > > I'm afraid I don't understand what you mean. What works fine: resources.cache.frontend.regexps.a.cache = true This doesn't work: resources.cache.frontend.regexps.$.cache = true

[fw-general] Dollar character in Zend_Config key

2009-05-04 Thread admirau
Hi! Im trying to pass application options from application.ini to the cache resource via following options: line: 19 of application.ini: resources.cache.frontend.regexps.^/$.cache = true Executing: $this->getOptions('resource'); produces exception: Zend_Config_Exception: Error parsing C:\Use

Re: [fw-general] Zend_Tool customization

2009-05-03 Thread admirau
Ralph Schindler-2 wrote: > > Yes, my plan for this week is to get out both module support as well as > custom profile support. I will drop a note to the list when its ready > to test from trunk/ > Will be right here waiting for you :) Thanks. -- regards takeshin -- View this message in

[fw-general] Zend_Cache pages+gzip

2009-05-03 Thread admirau
Hi! Below is fragment of my bootstrap file in which I enable gzip compression for all pages. It works fine unless I start caching pages via Zend_Cache_Frontend_Page. How should I enable gzip compression for cached pages too? /** * Send response to the browser * @access public stat

[fw-general] Zend_Tool customization

2009-05-02 Thread admirau
I'm creating projects using Zend_Tool provided with ZF 1.8. How change default view suffix to .xhtml instead of .phtml (I'm using PHPTAL). How to create module? Can I have default module in 'modules' directory? -- regards takeshin -- View this message in context: http://www.nabble.com/Zend_To