Re: [fw-general] Validating a person's name with Zend Validate

2009-01-08 Thread Lars Strojny
Hi Philip,

Philip G schrieb:
> McCain. ;)
Works totally fine with the solution Michael has proposed.

cu, Lars


Re: [fw-general] Zend_Dom out of memory

2009-01-01 Thread Lars Strojny
Hi,

Am Montag, den 22.12.2008, 06:27 -0800 schrieb fab2008:
> I think there are a lot of circular references in ZF implementation,
> are you aware of this problem? Is there any possible fix?

PHP 5.3 comes with a new garbage collector implementation. The new
garbage collector implements algorithms described in the following
paper: http://www.research.ibm.com/people/d/dfb/papers/Bacon03Pure.pdf
It behaves much better on long running scripts and is capable of
cleaning up cyclic references. 

Marco: just for curiosity, could you try running your script with 5.3?

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Using 2 databases with Zend_Db, when you have the same model.

2009-01-01 Thread Lars Strojny
Hi Taco,

Am Sonntag, den 28.12.2008, 12:12 +0100 schrieb Taco Jung:
[...]
> This way, I thought I could separate the public and admin even more.
> But as stated, it causes more problems then it solves.

Not necessarily. There are often reasons why a single application works
on different databases. One of the reasons might be legacy data or - if
carefully thought out - an admin panel requiring additional data. There
are two ways how to do that with the Zend Framework. The first way would
be to request your business objects from factories. The factories know
which database adapter must be passed. I don't really like this approach
because it spreads too much knowledge about the database structure in
the overall application. Another way would be to write your custom
database adapter implementing the same interface as Zend_Db_Adapter
(sadly, there is no interface for Zend_Db_Adapter implementations so you
must extend the abstract class). The connection adapter is a composite
of all of your required database connections. Plus it decides which
concrete adapter needs to be used for the concrete query. It could even
implement more complex stuff like sending queries to different servers
and merging the results and so on.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Downloading a file from server

2008-08-15 Thread Lars Strojny
Hi Gina-Marie,

Am Freitag, den 15.08.2008, 14:56 -0700 schrieb rollockg:
> I've been able to successfully upload a pdf file to my server, now I want to
> reverse the process. I just have no idea how to go about it using Zend
> Framework?

You do it in a very similar way as you would do it plain PHP: you send a
header, read the file, send the content of the file. So in a controller
it could looks something like this:

public function downloadAction()
{
$this->getResponse()->setHeader('Content-Type: foo/bar');
$filename = 
$this->sanitizeFilename($this->getRequest()->getParam('filename'));
$this->getResponse()->appendBody(file_get_contents($filename));
}

Note: the sanitizeFilename()-method is not present. You must implement
something like this to not introduce security issues where people can
download your /etc/passwd or something similar. But preferably such
validation is done in your domain model.
If you have a model and such file is part of your model, it could
probably look like that:

public function downloadAction()
{
$model = new YourDomainModel($this->getRequest()->getParam('filename'));
$this->getResponse()->setHeader('Content-Type', $model->getType());
$this->getResponse()->appendBody($model->getContent());
}

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] adding logic to Zend_Exception: observer pattern for logging

2008-07-23 Thread Lars Strojny
Am Mittwoch, den 23.07.2008, 20:43 +0200 schrieb Lars Strojny:
> In 5.3 you can pass the previous exception to the current as the third
> parameter. The previous exception can than later be retrieved with
> $exception->getPrevious(). 

Sorry, sent too early. What I wanted to add was: this could be easily
implemented for compatibility in Zend_Exception.
See http://lars.schokokeks.org/php/exception-previous-compat.phps

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] adding logic to Zend_Exception: observer pattern for logging

2008-07-23 Thread Lars Strojny
Hi Christoph, hi Peter,

Am Mittwoch, den 23.07.2008, 12:26 -0600 schrieb Christoph Dorn:
[...]
> I agree. I have had to comment out higher-level exceptions to figure out
> what goes on at a lower level.
> 
> There needs to be an exception stack just like in Java.

In 5.3 you can pass the previous exception to the current as the third
parameter. The previous exception can than later be retrieved with
$exception->getPrevious(). Take a look:
http://lars.schokokeks.org/php/exception-previous.phps

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Deprecation is ready for community review.

2008-07-22 Thread Lars Strojny
Hi Matthew,

Am Dienstag, den 22.07.2008, 08:12 -0400 schrieb Matthew Weier
O'Phinney:
> 
> Until we're able to move to 5.3, we still need a solution. I'll work
> with the internal team to develop a recommendation.

if (!defined('E_USER_DEPRECATED')) {
define('E_USER_DEPRECATED', E_USER_WARNING);
}

trigger_error('foo', E_USER_WARNING);

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Deprecation is ready for community review.

2008-07-21 Thread Lars Strojny
Hi Matthew, everybody,

Am Freitag, den 18.07.2008, 16:20 -0400 schrieb Matthew Weier O'Phinney:
> Stas is also proposing an E_USER_DEPRECATED level -- maybe just vote
> for that. :)

The patch for E_USER_DEPRECATED is now in 5.3 and HEAD. So no need for
Zend_Deprecation from my POV.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Using subdomains

2008-07-19 Thread Lars Strojny
Hi Jose,

Am Samstag, den 19.07.2008, 10:50 -0300 schrieb José de Menezes Soares
Neto:
> 
> I would like to create a script with ZF that:
> 
> 1. Access www.username.site.com
> 2. Prints username profile
> 
> I think I need to create an controller USER with action profile (
> http://www.site.com/user/profile/username), and, somehow link it to
> www.username.site.com by .htaccess...
> 
> But I don´t know how... any suggestions?

You could write your own router resolving $user.host.com to your user
controller. In your index.php there would be something like this:

setRouter(new My_Custom_Router());
}

Or you extend the current router and handle both cases in the router
itself.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Deprecation is ready for community review.

2008-07-18 Thread Lars Strojny
Hi Matthew,

Am Freitag, den 18.07.2008, 15:02 -0400 schrieb Matthew Weier O'Phinney:
> However, this is an engine-level error level -- you cannot trigger it
> from userland code. Additionally, we need to consider how we mark
> deprecation _before_ 5.3.

Aye, you are right. Just spoke, didn't test it before. But it would make
sense to allow that in the userspace. Baking a patch.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Deprecation is ready for community review.

2008-07-18 Thread Lars Strojny
Hi Tobias, hi Bill,

Am Donnerstag, den 17.07.2008, 10:42 -0700 schrieb Bill Karwin:
> Does this really need a new component?  What's wrong with
> trigger_error(E_USER_NOTICE)?  This seems a lot simpler and more
> concise.

In PHP 5.3 we will even have E_DEPRECATED as an error level.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Memory leak in Zend_Date?

2008-07-13 Thread Lars Strojny
Hi Matthew,

Am Samstag, den 12.07.2008, 19:11 -0400 schrieb Matthew Weier O'Phinney:
[...]
> Lars -- can you provide some benchmarks that show the memory differences
> between Zend_Date and DateTime? I'm curious to see if we might be able
> to isolate the performance issues, if any, and improve the situation.

You can find the results attached. The benchmark suite can be found at
http://lars.schokokeks.org/php/time-bench.phps

cu, Lars
Instanciating Zend_Date
   - Average memory usage: 55.44
   - Overall memory usage: 55440.00
   - Average time consumed (mS): 0.001242
   - Overall time consumed: (mS): 1.241695

Instanciating DateTime
   - Average memory usage: 0.272000
   - Overall memory usage: 272.00
   - Average time consumed (mS): 0.12
   - Overall time consumed: (mS): 0.011888

Returning a formatted date with DateTime
   - Average memory usage: 0.00
   - Overall memory usage: 0.00
   - Average time consumed (mS): 0.05
   - Overall time consumed: (mS): 0.005046

Returning a formatting date with with Zend_Date
   - Average memory usage: 9.80
   - Overall memory usage: 9800.00
   - Average time consumed (mS): 0.000750
   - Overall time consumed: (mS): 0.750078

Parsing date with DateTime
   - Average memory usage: 0.00
   - Overall memory usage: 0.00
   - Average time consumed (mS): 0.15
   - Overall time consumed: (mS): 0.014650

Parsing date with Zend_Date
   - Average memory usage: 67.696000
   - Overall memory usage: 67696.00
   - Average time consumed (mS): 0.008197
   - Overall time consumed: (mS): 8.197300



signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Memory leak in Zend_Date?

2008-07-12 Thread Lars Strojny
Hi,

Am Samstag, den 12.07.2008, 05:49 -0700 schrieb fab2008:
> What I want to say is that if there exists any problem it is in
> Zend_Date itself, not in my code, but perhaps I'm completely wrong.

I guess not. When playing around with Zend_Date we found out the same
with the result that we dropped using Zend_Date at all which works as
DateTime in core becomes more mature.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] ZF and unit testing

2008-06-10 Thread Lars Strojny
Hi Matthew,

Am Montag, den 09.06.2008, 10:47 -0400 schrieb Matthew Weier O'Phinney:
[...]
> Additionally, I've been working on a functional testing framework for
> MVC apps, building on PHPUnit:
> 
> 
> http://framework.zend.com/wiki/display/ZFPROP/Zend_Controller+Testing+Infrastructure

Have you considered hooking with this initiative?
http://phpunit.de/ticket/459

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Little ZF bootstrap speed tip

2008-04-10 Thread Lars Strojny
Hi Simon,

Am Freitag, den 11.04.2008, 01:24 +1000 schrieb Simon Mundy:
> Or it could be the Filesystem hit that Windows seems to impose on PHP?

I would not think so, compare
http://www.koders.com/c/fid9537284F5AF8C708F5890C2511718E5E48BB1A81.aspx?s=ftp#L2399
 and 
http://www.koders.com/c/fid9537284F5AF8C708F5890C2511718E5E48BB1A81.aspx?s=ftp#L2319

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Little ZF bootstrap speed tip

2008-04-10 Thread Lars Strojny
Hi Robert,

Am Donnerstag, den 10.04.2008, 15:46 +0100 schrieb Robert Castley:
> I have found out today that by using ini_set in your bootstrap is  
> slower than using set_include_path
> 
> Using HTTP Analyzer I achieve the following results:
[...]

Disable open_basedir and safe_mode and both will have the same speed.
ini_set() does a lot of path checking (this could be optimized anyway)
but only if open_basedir or safe_mode restrictions are enabled.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Request to correct a sample code in ZF Manual

2008-02-01 Thread Lars Strojny
Hi,

Am Freitag, den 01.02.2008, 09:48 -0500 schrieb Matthew Weier O'Phinney:
[...]
> So, what I'm thinking is that instead of checking for is_int(), we
> should cast to int prior to any other checks. That way, both '303' and
> 303 will work, and users don't need to be worried about the specific
> type they send.

This won't work, as Redirector::redirect('foo') will return 0. Just
replace the is_int() with is_numeric() and cast it to an integer before
sending the header to make sure it is not a float.

cu, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend Framework standards SVN pre-commit hook

2008-01-29 Thread Lars Strojny
Hi,

Am Dienstag, den 29.01.2008, 12:01 + schrieb Tom Percival:
> Does anyone know of a script that validates code to the Zend Framework
> coding standard that could be used as a pre-commit hook in SVN?
> 
> I have found mention of this in the Zend Framework Wiki
> (http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft))
> but no indication that it was followed up by anyone.

There is PHP_CodeSniffer (http://pear.php.net/package/PHP_CodeSniffer/)
which has a specific set of rules for the Zend coding style. Try that
out but it might be too slow for live checking on when a commit takes
place.

cu, Lars
-- 
  »Aber das Verhältnis von Leben und Produktion, das jenes
   real herabsetzt zur ephemeren Erscheinung von dieser, ist
   vollendet widersinnig. Mittel und Zweck werden vertauscht.«
   -- Theodor W. Adorno, »Minima Moralia«, Die traurige Wissenschaft

Lars Strojny
Nießenstr. 36
51103 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Controller_Action naming

2008-01-25 Thread Lars Strojny
Hi,

Am Donnerstag, den 24.01.2008, 17:30 -0800 schrieb Ralph Schindler:
[...]
> I have a +1 on making _Abstract a coding standard (as well as _Interface 
> ;)  )

I think it should at least be partially considered that PHP 5.3
introduces real namespacing. Hopefully ZF will switch to namespaces
sometimes, which would require changing all the ::Abstract
and ::Interface-bits to something completely different. "Interface" and
"Abstract" are reserved keywords and therefore "class Abstract {}" does
not work. But with namespaces it would be "namespace Zend::Controller;
class Abstract {}" which just throws an syntax error (I know, there is a
patch flying around but there are some performance concerns regarding
parser speed when allowing "Abstract" and "Interface" as a class name). 
So I would propose to find a scheme which will be easily portable to
native namespaces. Something like Zend_Controller_AbstractAction is much
nicer anyway and will then - someday - easily work as
Zend::Controller::AbstractAction :-)

cu, Lars
-- 
  »Die Glorifizierung der prächtigen underdogs läuft auf
   die des prächtigen Systems heraus, das sie dazu macht.«
     -- Theodor W. Adorno, »Minima Moralia«: They, the people

Lars Strojny
Nießenstr. 36
51103 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Log with SMTP

2007-11-16 Thread Lars Strojny
Hi,

Am Mittwoch, den 14.11.2007, 21:26 +1100 schrieb Simon Mundy:
[...]

> > I dont understand, I need the logger to email ERROR level
> > problems :)

Maybe what you need is a writer for a database, not for mail. When an
fatal error occurs it will likely occur more than once. So using mail
logging can affect your complete system, because as more errors as more
mails (first your web server get in trouble, than your mail server does,
which affects stability of your web server and so on, vicious circle).
This tight chaining of components is considered a bad practice. Think
about logging the fatal errors to a database and send *one* mail every
five minutes.

cu, Lars
-- 
  »Die Glorifizierung der prächtigen underdogs läuft auf
   die des prächtigen Systems heraus, das sie dazu macht.«
 -- Theodor W. Adorno, »Minima Moralia«: They, the people

Lars Strojny
Nießenstr. 36
51003 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Existing Applications?

2007-05-28 Thread Lars Strojny
Hi,

Am Freitag, den 06.04.2007, 16:21 -0400 schrieb Jeffrey Sambells:
[...]
> I'm just evaluation (re-evaluating actually) ZF for use in our  
> production environment and I'm wondering if there are any ready-made  
> applications using ZF? Things like catalogues, shopping carts, member  
> management, calendars etc. Is there a list somewhere of existing  
> projects available for use or is everyone just dealing in proprietary  
> applications?

Actually Neu.de, one of the biggest german dating portals, uses a lot of
ZF components since our relaunch in february this year.

Greets,
  Lars Strojny
-- 
  »Die Glorifizierung der prächtigen underdogs läuft auf
   die des prächtigen Systems heraus, das sie dazu macht.«
 -- Theodor W. Adorno, »Minima Moralia«: They, the people

Lars Strojny
Engelsstr. 23
51003 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Webservices_SecondLife?

2007-03-10 Thread Lars Strojny
Sorry, sent too early. Here is the link:
http://secondlife.com/developers/third_party_reg/llsd_libs/llsd.php-lib

Am Samstag, den 10.03.2007, 14:12 +0100 schrieb Lars Strojny:
[...]
> [1] 

Greets, Lars Strojny
-- 
  »Die Glorifizierung der prächtigen underdogs läuft auf
   die des prächtigen Systems heraus, das sie dazu macht.«
 -- Theodor W. Adorno, »Minima Moralia«: They, the people

Lars Strojny
Engelsstr. 23
51003 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[fw-general] Zend_Webservices_SecondLife?

2007-03-10 Thread Lars Strojny
Hi,

due to the fact, that Linden Labs PHP-library[1] supports PHP5 just with
a compatibility wrapper and also due to the fact, that this library is
not what I would think is elegantly implemented I wrote a completely
independent version for my employer Neu.de in the last days. It is now
completely working, is unit tested and is used on http://neu.de to
provide a registration form. My library reuses more or less the design
of Zend_XmlRpc because the SL-API is more or less XmlRpc with other
names and a slightly diferrent syntax. For example, this is a
XML-payload for an array:


   my string
   1234
   true


So, I had written a class for every SL-type using DOMDocument to render
the payload.

The library is currently named NuSecondLifeClient and is used the
following way:

// Set up the client and supply your API access data
$client = new NuSecondLifeClient($firstname, $lastname, $password);

// Return a list of valid last names for the registration in the format
// [] => []
$client->getNames();

// Check if a user given username/last_name_id-combination is unused
$client->checkName($username, $last_name_id);

// Create a new user
$client->createUser($username, $last_name_id, $email, $password, 
$date_of_birth, $limited_to_estate, $start_region_name, 
$start_local_x, $start_local_y, $start_local_z, $start_look_at_x,
$start_look_at_y, $start_look_at_z);

Beneath that there are public functions like $client->getErrorCodes(),
which fetches the API error codes,
$client->getRegistrationCapabilities(), which fetches the needed
capability URLs (they do authentification via URLs). 

The current status is, that the library works pretty nice, has a good
test coverage and is going to be released as an Open Source component
anyway.

I would really love it so see this library integrated into the ZF. Am I
the only one who is interested in that?

[1] 
-- 
  »Aber das Verhältnis von Leben und Produktion, das jenes
   real herabsetzt zur ephemeren Erscheinung von dieser, ist
   vollendet widersinnig. Mittel und Zweck werden vertauscht.«
   -- Theodor W. Adorno, »Minima Moralia«, Die traurige Wissenschaft

Lars Strojny
Engelsstr. 23
51003 Cologne
Jabber/Mail: [EMAIL PROTECTED]
Weblog: http://usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: Fw: [fw-general] Consistency in naming

2007-02-19 Thread Lars Strojny
Hi,

Am Montag, den 19.02.2007, 19:26 -0800 schrieb Matthew Ratzloff:
[...]
> > Also I suggest to use Zend_Data_Validator name instead of a plain
> > Zend_Validator.
> > What do you think?

Zend_Data_Validatar is meant to be a validation class for Zend_Data,
which does not exists. So a valid name would be Zend_DataValidator. But
does the "Data"-prefix makes anything more cleaner? I would state no. In
fact there are just "Data" which can me validated, or can you imagine
something else? So the prefix "Data" makes nothing clearer and
Zend_Validator is fine enough.

Nice greetings, Lars Strojny
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] UML, ZF Coding Standard differences in Zend_Pdf

2007-02-19 Thread Lars Strojny
Hi,

Am Montag, den 19.02.2007, 21:46 +0300 schrieb Alexander Veremyev:
> Hi all,
> 
> It's not a bug. It's a feature :)

It's not :-)

> Zend_Pdf_Image is not intended to be used without Zend_Pdf class.
> 
> Zend/Pdf/Resource/Image.php file is loaded by require_once() call in 
> Zend/Pdf.php file.
> 
> So there are no problem for classes autoloading.

That's not the thing. It has something to do with conventions.
Conventions suck when there are exceptions. There are a lot of classes
in the Zend Framework which are not indended for the plain usage of a
common user. The normal concept for hiding a class is to just not
document the class. I would like to ask you to move or rename the class,
it does not make any sense. Or at least, until now it does not make any
sense.

Nice Greetings, Lars Strojny
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] UML, ZF Coding Standard differences in Zend_Pdf

2007-02-19 Thread Lars Strojny
Hi,

Am Montag, den 19.02.2007, 14:01 +0100 schrieb André Hoffmann:
[...]
> While reverse-engineering the ZF for testing purposes I came across
> some major Coding Standard differences in the Zend Framework
> concerning the classes in Zend/Pdf/Resource:
> For example Zend_Pdf_Image is not(as you would guess by the name)
> located in Zend/Pdf/Image.php, but in Zend/Pdf/Resource/Image.php. 
> I couldn't double-check this with the Coding Standard though as the
> wiki seems to be down(502 Proxy Error).
> 
> I'm aware that __autoload is not used in the Zend Framework and
> therefore this is not such a big deal, but since I'm a fan of the
> "class name represents the location"-model I'd like to mention it at
> least(given the almost final stage of the ZF). 

__autoload() is of course used in ZF. A lot of tutorials suggest to
either define function __autoload($className)
{ Zend::loadClass($className) } or to do
spl_register_autoload(array("Zend", "loadClass")). Not just as a matter
of this fact it is definitely a bug and should be fixed. Thanks for your
hint.

Greetings, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Support for $_FILES in Zend_Controller_Request_Http

2007-01-26 Thread Lars Strojny
Hi,

Am Freitag, den 26.01.2007, 15:02 +0100 schrieb Georg von der Howen:
> Hi,
> 
> I  can't find specific methods to access data about uploaded files from
> a Zend_Controller_Request_Http object. Is there a reason for not
> supporting the global $_FILES in that class?

I would suggest to implement Zend_Controller_Request_Http_Files to wrap
$_FILES in a sensible way.

Extending Zend_Controller_Request_Http:

class Zend_Controller_Request_Http implements 
 Zend_Controller_Request_Interface
{
...
   public function __get($variable)
   {
   switch ($variable) {
   case 'files':
  if ($this->_files === null) 
  $this->_files = new Zend_Controller_Request_Http_Files;
  return $this->_files;
   }
   }
}

class Zend_Controller_Request_Http_Files
{
public function hasFiles()
{
return !empty($_FILES);
}

// Mask can be an array of requirements that must be fullfilled if we 
move it
// array('mimetype' => 'application/.*', 'size' => '<1MB')
public function moveFiles($target, array $mask = null)
{
foreach ($_FILES as $file) { ... }
}

public function hasFile($name)
{}


public function moveFile($file, $target, array $mask = null)
{

}
}

So, in your controller you do the following thing:

public function myAction()
{
if ($this->getRequest()->files->hasFile('myfile')) {
try {
$this->getRequest()->files->moveFile('myfile',  MY_UPDLOAD_DIR);
} catch (Zend_Controller_Request_Http_Files_Exception $e) {
$this->getView()->upload_error = gettext($e->getMessage());
}
}
}

Greetings, Lars Strojny


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] ZF and Autoloading

2007-01-07 Thread Lars Strojny
Hi,

Am Sonntag, den 07.01.2007, 13:07 -0800 schrieb Charles:
[...]
> It seems that using autoload would lower the barrier-to-entry to using
> ZF (if just a little), and eliminate a whole class of problems that
> will otherwise be posted about ad-infinitum on this and other lists.
>
> Even if using autoload costs a few CPU cycles here and there and
> exposes a some caching bugs that need to be fixed, it seems like it'd
> have the potential to collectively save tens of housands of man-hours
> per year that would otherwise be spent debugging and helping newbies
> like myself.

I totally agree with you. From my experience at least during the
development, autoloading is a wonderful thing. If you find out, due to
benchmarks, that your the executation time leaks at autoloading, you
would generally invent another technology (like putting all your classes
in one file or something like that). For daily usage, autoload is a
wonderful thing and we should not force our users to work with
require_once() or something like that. If you want to load all you
classes at once, you can use an explicit require_once() anyway.

Greetings, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] ZF and Autoloading

2007-01-07 Thread Lars Strojny
Hi,

Am Sonntag, den 07.01.2007, 05:00 -0500 schrieb Shekar C Reddy:
> I see at least one benefit to using autoload - load classes only
> as-needed. Changes to code/framework frequently need a re-visit to the
> require*() calls to see if any classes are loaded superfluously. Some
> classes loaded superfluously could load additional classes that may
> also be superfluous in a dynamic situation. But I'm still not clear
> with op-code caches as some say they had issues while others say they
> had no problems using them with autoload. Maybe, these got resolved
> with the later versions of PHP/op-code caches?

To clear this thing up a bit: I'm using XCache with many of my projects
and I can state that it works fine with autoload. You can see cached
files in the stats which are just loaded via autoload. So no problem
there. This also means, that there is no general problem with
__autoload() and op-caches but potentially some of the caches out there
have problems. But then we have the situation that they need to fix it.
There is no need to work around buggy software. Can someone states
similiar informations for eaccellerator, then Zend thingy and APC?

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[fw-general] Thinking again about Zend_Image

2007-01-02 Thread Lars Strojny
Hi all,

there were two[1],[2] slightly different proposals for Zend_Image in the
past. The reason for the rejection of that proposals was, that they were
too near to the good ol plain usage of GD or ImageMagick. Also during my
daily work I highly appriciate such solution, when I'm not forced to
take care on a resource handle by myself, but a simple wrapper does that
for me, it is not enough for a framework, which considers itself sort of
high-level.

But while developing my own small project with Zend Framework I've
needed a solution, which provides me such a high level API to manipulate
images. My design considerations are the following: the actions you can
apply to images are too different to unify them in one big class and:
the implementation should be independent of the existent module (either
PECL-Imagic, which I prefer, GD, commandline Imagick, Imlib). But: the
problem is, that not every library provides the complete set of features
a developer might need Roughly there are the following tasks:

* Reading an image from a string or a file and juggling with different
formats (maybe the juggling part should be Zend_Image_Convert, not sure
here)
* Changing the size of an image (cropping, scaling, resizing)
* Image generation (drawing lines, adding text, etc.)
* Applying filters like gaussian blur
* Defined single use cases like generating captchas or creating
thumbnails

To translate that roughly into a class structure, we will have a set of
simple Facades
* Zend_Image - reading and writing an image
* Zend_Image_ChangeSize - resizing, cropping, scaling
* Zend_Image_Draw - Drawing lines, texts, circles
* Zend_Image_Filter - Applying a gaussian blur, colorifying an image
* Zend_Image_Task_Captcha, Zend_Image_Task_Thumbnail - defined special
purposes which are common when developing web applications

To make it short, I have a set of Zend_Image objects in mind with
different concrete implementations, a unified API and a really easy
access to general image functionality.

The other sensible thing of such a class model is, that you can develop
the classes iteratively. So man can start with Zend_Image and all the
concrete implementations, going over to Zend_Image_ChangeSize and so on.

I hope, my ideas are not too strange and I would be really interested in
feedback.

[1] http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+Proposal
+-+Davey+Shafik
[2] http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+-+Eric
+Potvin

Have a nice evening, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] [ANNOUNCEMENT] PhpWishList becomes public

2007-01-02 Thread Lars Strojny
Hi Gavin,

Am Dienstag, den 02.01.2007, 11:08 -0800 schrieb Gavin Vess:
> Thanks Lars for a very nice new year's gift to our community :)

Thanks for your work. It's similiar to the cultural production. As a
programmer you always stay on the shoulders of giants.

> I couldn't resist .. http://framework.zend.com/wiki/x/Njc

A nice.

> Hopefully, we can get a nice list started, so that more PHP developers 
> can find these.

So I'm correctly informed that PhpWishList is the first Open Source
project based on Zend Framework?

Greets, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[fw-general] [ANNOUNCEMENT] PhpWishList becomes public

2007-01-01 Thread Lars Strojny
Hi dear ZF contributors,

I'm happy to announce PhpWishList. PhpWishList is a solution to manage
personal  wishlists, similiar to the one Amazon provides. Currently it
supports the following features:

 * Adding/editing/deleting wishes as owner
 * Viewing wishes as visitor
 * Donating a gift as visitor
 * Exporting wishes as an Atom-feed


Planned for the next iterations:
 * Amazon import
 * Wish-formatting with a more Decorator-oriented theory of operation
 * Amazon ad-link support
 * Internationalization (currently it is a crude mix)


It utilizes currently Zend_Controller_*, Zend_Date, Zend_View, Zend_Db,
Zend_Db_Table, Zend_Session, Zend_Config and Zend_Mail. You can fetch
your own copy of PhpWishList from https://svn.usrportage.de/PhpWishList/

Have a nice day,
  Lars Strojny
-- 
Weblog: http://usrportage.de
List of wishes: http://gift.usrportage.de


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] PHP Adoption and the Zend Framework

2006-12-17 Thread Lars Strojny
Am Sonntag, den 17.12.2006, 20:10 +0700 schrieb Dinh:
> There are several PHP hosting companies that offer free PHP 5.2 engine
> already. However,  it comes as a surprise to me that all of them
> refuse to offer PDO for MySQL or PosgreSQL.  

Not all refuses that ("shameless plug"): http://schokokeks.org 

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] PHP Adoption and the Zend Framework

2006-12-17 Thread Lars Strojny
Am Dienstag, den 12.12.2006, 00:40 -0500 schrieb Lee Saferite:
> Well, Gentoo has 5.1.6 listed as stable and 5.2 in available in an
> overlay

And I really do not understand why it is not moved into portage since
i'm using it on different hosts with different setups for weeks without
any problems. I'm not sure, what's the showstopper here.

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Build Zend Framework, parse errors.

2006-12-17 Thread Lars Strojny
Hi,

Am Dienstag, den 12.12.2006, 18:38 +0200 schrieb Joe Kramer:
[...]
> It's not only about obfuscating.
> Zend Guard optimizes performance of scripts. Compiles php files into
> bytecode. And it caches them.
> Makes perfect sense for high-volume projects.

I do not want to be beaten by the Zend-guys, but if you just want to
have bytecode, then try Xcache[1]. It works pretty well, provides a
sensible admin interface and is open source software, btw. I'm currently
one of the developers of germany's biggest dating platform, and we are
using there the Zend Framework combined with Xcache which works
flawlessly.

http://trac.lighttpd.net/xcache/wiki/

Greetings, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] CCing across lists

2006-12-04 Thread Lars Strojny
Hi,

Am Montag, den 04.12.2006, 12:50 -0600 schrieb Ralph Schindler:
> Bill,
>A simple request, but worth mentioning: Any chance of us getting 
> reply-to: header in emails being sent from the list?  That way, by 
> default, clicking reply would simply send back to the list and that 
> people would have to reply-all if they feel it nessessary to send the 
> same message to the poster as well...

No, this is not a good idea. That seems to be an obfuscated way of using
the Reply-To functionality. Is is designed to provide the possibility to
the user, to specify the personal reply to. And, on the other side,
every normal mail client knows a reply to list shortcut, in evolution it
is ctrl+l.

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] "Live" testing of Zend_XmlRpc

2006-12-02 Thread Lars Strojny
Hi!

Am Samstag, den 02.12.2006, 14:57 +0200 schrieb Shahar Evron:
[...]
> I've played around with the Zend_XmlRpc tests, trying to test how it
> plays with the new HTTP client. I was expecting the tests to fail, but
> they didn't. I'm not sure there is any tests that actually performs an
> HTTP request.
> 
> Does anyone have some scripts that actually test Zend_XmlRpc with a real
> HTTP request, so that we can make sure all the needed modifications are
> done before we replace the old HTTP client?

We're using Zend_XmpRpc_Client at Nu2M in combination with Ejabberd's
XMLRPC-API, so I can test it next week or so, if I find enought time.

Greets, Lars 
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Filter :alpha

2006-11-18 Thread Lars Strojny
Am Samstag, den 18.11.2006, 15:14 +0100 schrieb Thomas Weidner:
[...]
> // example code
> public function getAlpha($name, $locale = false) {
> $characters = 'a-z';
> if ($locale ! = = false) {
> $characters = Zend_Locale_Data::getContent($locale, 'characters');
> }
> preg_match($characters, '/[' . $characters . ']/', $result);
> return $result;
> }

*argh*, ok. You're right, I have to regret everything I said before.
Just forget the whole thread.

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Filter :alpha

2006-11-18 Thread Lars Strojny
Hi,

Am Samstag, den 18.11.2006, 13:58 +0100 schrieb Thomas Weidner:
[...]
> Making 126 subclasses, one for every language, is a very bad design idea.

From the first look, yes, but from the second view maybe not. These
classes would be very, very small. Making Zend_Filter locale aware is
pretty hard to reach. You will have a big switch ... case-statement in
every filter function which is not the best I guess. Having classes with
a small footprint is maybe the better solution as in normal use-cases
just one class must be loaded.

> Why not making the filter locale aware ?

A locale-aware Zend_Filter-class seems to be pretty fat-weighted.
Remember the switch ... case.

> Exactly therefor we created the complete Zend_Locale classes bunch.
> 
> Filter without locale only recognising a-z
> getAlpha($content);
> 
> Filtering with locale recognising locale letters for example german 
> including ä, ö, ü, ß
> getAlpha($content, $locale);

This would be possible. 
We have Zend_Locale_Filter (or another name).
Zend_Filter::getAlpha($string, "de") now calls internally
Zend_Locale_Filter::singleton("de")->getAlpha($string) and returns the
value (we would need some hybrid of singleton and factory there, as
Zend_Locale_Filter would create, store and deliver the
Zend_Locale_Filter_-object). And no, I did not thought further
on saying "let's call it Zend_Locale_Filter" and I'm completely
unideological how to name it.
[...]

> There is a general approach for usage which should be used by all classes
> which want to be locale aware.
[...]

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Filter :alpha

2006-11-18 Thread Lars Strojny
Hi all,

Am Freitag, den 17.11.2006, 18:11 +0100 schrieb Thomas Weidner:
> > Also relevant to an implementation of Zend_Filter::getAlpha(): 
> > http://framework.zend.com/issues/browse/ZF-550
> 
> 1.) Not all languages seemed to be supported
> 2.) Performance problems if used in standard... should be selectable when 
> used if use it or not
> 3.) This way ALL characters would be given... So if we have "Exámplé" it 
> would also returned but á and è are not
> contained within the english characterset. Could lead to problems...

Maybe we must rethink the whole filtering thingy. I would propose to
split out the locale-dependant filters from Zend_Filter and put them
into - let's say - Zend_Locale_Filter. Zend_Locale_Filter has a lot of
subclasses, for instance Zend_Locale_Filter_German,
Zend_Locale_Filter_English, Zend_Locale_Filter_Japanese, etc. which
implements the filters for there own needs. Zend_Locale_Filter has a
factory class, were you can pass a Zend_Locale object or a simple locale
string to make sure, the correct subclass is instanced. Maybe there is
no other chance to ship around this locale-aware filter problem.

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Interested in Zend_Log_Adapter_Syslog

2006-11-09 Thread Lars Strojny
Hi,

Am Donnerstag, den 09.11.2006, 14:10 +0100 schrieb Thomas Weidner:
> > I've written a Syslog-Adapter for Zend_Log. Is there any interests to
> > put this into the framework?
> 
> Definitly yes...
> I presume it works for both Win*nix :-)

No chance to test it on a win-machine. Just have *nix-boxes here. So I
just do not now.

Greets, Lars


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[fw-general] Interested in Zend_Log_Adapter_Syslog

2006-11-09 Thread Lars Strojny
Hi all,

I've written a Syslog-Adapter for Zend_Log. Is there any interests to
put this into the framework?

Greetings,
  Lars Strojny


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Why not Zend_Xmpp?

2006-10-09 Thread Lars Strojny
Hi,

Am Montag, den 09.10.2006, 17:15 +0100 schrieb Mat Scales:
[...]
> > there is one big thing, which is really missing in the PHP world: a
> > sensible designed Jabber[1] class, which includes more than just a
> > simple client.
> The question is not 'is this a good idea?' but 'who is going to write it?'.

I'm currently working at a company who is highly interested in Jabber
development and is also working with the Zend framework. Hopefully they
will sponsor me some time to develop this component. Until we finalized
our current (big) project, I will have more time. But hopefully I will
be ready to code in that time, so I want to clear things first.

> Writing it up as a proposal will be a reasonable start, but even better 
> would be if someone started writing the code :D

I have some code, which implements core things like correct JID-handling
etc. Also I'd played around with XML-parsing and Stanza creation (but
naming this code a class, would go to far).

> Given that proposals can take a long time to get approval, I think we 
> should all encourage people to get on and write code while they are 
> waiting for approval.  If I wasn't actively writing Zend_Http_Server I'd 
> have got bored of waiting for approval long ago (*nudge* ;) )

This issue should be fixed by Zend itself. It is not a sensible attitude
to spend more time to such an issue than needed, so hopefully such
processes will speed up in the future. It is just like a
PHP-application. If the speed of the application doesn't only depend on
the speed of the database, there is something wrong. In software
development, there is something wrong, if developers have to wait for
anything.

Greets, Lars Strojny
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Why not Zend_Xmpp?

2006-10-09 Thread Lars Strojny
Hi,

Am Montag, den 09.10.2006, 13:55 +0200 schrieb Thomas Weidner:
> Why only focus on the XMPP protocol ?

Because you also focus on the HTTP protocol if you implement an
HTTP-client. It is not worth thinking on supporting Gopher.

> It should be no big problem to define an class/interface which is able to 
> handle also other protocols than XMPP.

XMPP != IM-protocol. This is an often told nightmare, which is sad. XMPP
stands for »Extensible Messaging and Presence Protocol«, while Jabber is
the concrete implementation of messaging and presence. We can build a
Zend_Chat or Zend_Im interface for various protocols upon Zend_Xmpp, but
I would not prefer the other way around. I'm a fan of concluding from
the complicated to the simple things. There could be Zend_Im, it could
utilize Zend_Xmpp and is is worth thinking about. But the Jabber
protocol is worth to be supported as complete as possible.
The problem is, that a unification of ICQ, MSN, YIM, GaduGadu, etc. and
Jabber tends to lead to the problem, that all protocols becomes stripped
down to the lowest level (see libgaim and it's derivates). Let's face
the facts, ICQ does not even supports a sensible subscription mechanism,
while Jabber does (subscription "to", "from", "both"). To be fair, ICQ
is a completely different protocoll for a completely different target.
The only intersection of ICQ and Jabber is, that both supports instant
messaging in some ways.

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Session

2006-10-09 Thread Lars Strojny
Hi,

Am Freitag, den 06.10.2006, 12:09 -0500 schrieb Ralph Schindler:
> 
> Darek wrote:
> > AFAIK there's  only proposal of Zend_Session
> > 
> 
> 
> There is code, in fact I am just waiting for the go ahead and feedback 
> notes from Gavin and zend to make changes and get it into the incubator.
> 
> My current codebase that supports the methods and conventions outlined 
> in the proposal can be found here:

I wonder how to provide home-grown backend implementations. An often
needed usecase is - as I think - to store sessions in a MySQL-database.
Maybe it is worth thinking about an adapter-solution similiar to
Zend_Cache. Memcache and APC are also sensible backends for Session
handling.

Greets, Lars Strojny
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_Config::asArray() vs. Zend_Db_Row::toArray()

2006-10-07 Thread Lars Strojny
Hi,

Am Samstag, den 07.10.2006, 18:56 +0200 schrieb Ralf Eggert:
[...]
> is there a reason why the functions Zend_Config::asArray() and
> Zend_Db_Row::toArray() are not called the same?
> 
> Both functions return an array. So why not call them the same, either
> toArray() or asArray()?

I would prefer asArray() because I hope that someday PHP will provide
the __toString() magic function for every type, means __toArray(),
__toInteger(), __toFloat() and so on. Thus, having __toString() it seems
logically to call a function, which converts Foo to an Array, toArray().

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[fw-general] Why not Zend_Xmpp?

2006-10-07 Thread Lars Strojny
Hi,

there is one big thing, which is really missing in the PHP world: a
sensible designed Jabber[1] class, which includes more than just a
simple client. In other programming languages there are cool and
feature-rich libraries, just think on xmpp4r[2] in Ruby, which is
developed by Stephan Maka, a collegue of mine or the deep integration of
XMPP in the Twisted framework, or XMPPPY and so on. 

The plan to develop a Zend Jabber class has to be done with the fact,
that it would not be possible to bring a complete set of features from
the beginning. So we should start with the maybe most-needed variant, a
Jabber client.


Usecase
^^^
$client = new Zend_Xmpp_Jabber_Client;
$client->setUsername ("[EMAIL PROTECTED]");
$client->setPassword ("...");
$client->setAuthentificationMethod (Zend_Xmpp_Jabber::TLS);;
$client->connect ();
$client->sendMessage (new Zend_Xmpp_Jabber_Message ("my message", 
Zend_Xmpp_Jabbe_Message::MESSAGE, "my subject" ));


First components

* Zend_Xmpp_Node_Abstract
  Core implementation of an XML node (extending DOMElement and DOMAttr)
* Zend_Xmpp_Stream
  Xmpp stream (based on DOMDocument)
* Zend_Xmpp_Jabber
  Core Jabber protocoll
* Zend_Xmpp_Jabber_Client
  Wrapps core protocoll issues to a complete client

  __construct([String jabber_id|Zend_Xmpp_Jabber_Id);
  connect();
  setPort()
  getPort()
  getHost()
  enableTls($useFallback = false)
  disableTls()
  enableSsl($useFallback = false)

* Zend_Xmpp_Jabber_Id
  A container for Jabber Id
  
  __construct([String jabber_id | String username, [String hostname]])
  setHost(String hostname)
  getHost()
  setUsername(String username)
  getUsername()

* Zend_Xmpp_Jabber_Message
  Implementation of a Jabber message

  __construct([ String message, [Constant type, String subject]]);
  setMessage (String message);
  getMessage();
  setType (Zend_Xmpp_Jabber_Message::MESSAGE|Zend_Xmpp_Jabber_Message::CHAT)
  getType();
  setSubject (String subject);
  getSubject ();


Problems:
^
PHP does not support threads which would be cool for a Jabber library,
but hey, let's work around.


Further ideas
^
* Zend_Xmpp_Pubsub - the publish/subscribe protocoll
* Zend_Xmpp_Jabber_Muc_Client - Multi user chat client
* Zend_Xmpp_Jabber_Roster - Buddy list implementation
* Zend_Xmpp_Jabber_Iq - Information queries
* Zend_Xmpp_Jabber_Vcard - Vcard implementation
* Zend_Xmpp_Jabber_Dataforms - The form protocoll which is used, when a
Jabber componenent (e.g. transport) sends forms (Maybe somehow based on
Zend_Forms)
* Zend_Xmpp_Jabber_ServiceDiscovery - 
* Zend_Dns_SrvLookup - For DNS service discovery (could be used by
various components)


[1] http://jabber.org
[2] http://home.gna.org/xmpp4r/


Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend_FilterChain / Zend_Container

2006-10-02 Thread Lars Strojny
Am Mittwoch, den 27.09.2006, 18:52 -0700 schrieb Christopher Thompson:
> I agree that the ZF would benefit by having the container type objects 
> share a common interface. Whether any of these classes inherit a basic 
> array/property class is a separate question that should be made on a 
> case by case basis. But having a common interface standard would easy 
> learning the ZF by making container interfaces predictable.

Is there something that prevents us from using ArrayObject?

Greetings, Lars Strojny


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Community chat

2006-10-02 Thread Lars Strojny
Hi,

Am Dienstag, den 26.09.2006, 08:53 -0500 schrieb Richard Thomas:
[...]
> 1. Jabber based so any client that can do jabber can connect, it also 
> has its own client as well.

Did I mentioned that there is really a gap to fill in PHP: there is no
sensible Jabber-class out there. What do you think about Zend_Xmpp oder
Zend_Jabber?

Greets, Lars Strojny


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[fw-general] Filter_Input::testEmail() and Filter::isEmail()

2006-09-24 Thread Lars Strojny
Hi,

I know, there is a multipage-solution for regular expression for email
addresses but wouldn't it fit to use something like /^[0-9a-z
[EMAIL PROTECTED]/ until we have the real solution? And:
Input_Filter::testName() should also allow umlauts and accents, should I
open a ticket?

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [fw-general] Zend::loadFile(), Zend::isReadable() and speed

2006-09-23 Thread Lars Strojny
Hi,

Am Samstag, den 09.09.2006, 04:39 +0200 schrieb Lars Strojny:
[...]
> So I attach a diff which implements that.

What about the patch in the attachement? Will it be integrated or should
I supply a solution with explode(PATH_SEPARATOR,
ini_get("include_path")?

Greets, Lars
-- 
  "Kriterium des Wahren ist nicht seine unmittelbare
  Kommunizierbarkeit an jedermann"
 -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik«

name: Lars H. Strojny  web: http://strojny.net 
street: Engelsstraße 23blog: http://usrportage.de
city: D-51103 Köln mail/jabber: [EMAIL PROTECTED]
f-print: 1FD5 D8EE D996 8E3E 1417  328A 240F 17EB 0263 AC07


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil