Thank you for taking the time to clarify. While the native php
directoryiterator class is very comprehensive I believe I will still
use the Joomla JFile, JDirectory helpers as this seems the safest
option for the time being... or is it? hmmm on that note, Do you know
if these classes will be depreciated in favour of using native PHP
classes in the near future?
> Hi Rouven, I see you made the following comment:
> "-We try to avoid using JFile, JFolder, etc. when native PHP code exists to
> do the same thing. Forexample instead of using JFolder::files a
> DirectoryIterator can be used. An example can be found in
> JSession::getStores. "
> And I was wondering if you could offer more clarification. I have always
> thought that using the J! framework libraries / methods was the accepted
> and to only fall back onto PHP native methods when J! didn't offer an
> abstract. In regards to JFile, JFolder, etc I thought that this was used to
> resolve issues with the FTP layer and stuff.
> Thank you for any further insight that can be offered on this.
> Kind regards,
> Adam
> On Tuesday, August 7, 2012 12:01:08 PM UTC-3, Rouven Weßling wrote:
> > I'm not completely trough but this looks like it will work great. I also
> > have a few comments (or almost nitpicks):
> > -New packages should completely rely on the autoloader. I think your
> > naming convention and file structure are correct for that but you're still
> > using jimport(). Why?
> > -We don't use package exceptions (JMediaException) anymore and instead use
> > SPL exceptions (RuntimeException, InvalidArgumentException, etc.)
> > -We try to avoid using JFile, JFolder, etc. when native PHP code exists to
> > do the same thing. Forexample instead of using JFolder::files a
> > DirectoryIterator can be used. An example can be found in
> > JSession::getStores.
> > On 07.08.2012, at 11:29, kavith Thiranga <rc40...@gmail.com <javascript:>>
> > wrote:
> > > A solution will be to add a method to js compressor that will change php
> > ini value ''mbstring.func_overload" to 2 (See
> >http://php.net/manual/en/mbstring.overload.php) whenever user wants to
> > compress a mb encoded file. May be we can add a compressor option also. I
> > have just added a method to change mb internal encoding to 8 bit
> > (seehttps://
> > github.com/kaviththiranga/joomla-platform/blob/JMedia/libraries/joomla/medi a/compressor/js.php#L322)
> > if php mbstrings functions are already enabled and overloading normal
> > string functions with mbstring functions is also enabled. See the
> > _changeCharEncoding() method. It actually does nothing to affect the
> > compression unless user manually configures php.
> > Not a good idea to encourage overloading since we generally require the
> > exact opposite (that they'Re not overloaded). This is also for performance
> > reason since the mb_* functions are quite a bit slower.
> > Also we haven't required the mbextension (yet), so whenever possible
> > JString or if the method isn't present there phputf8 should be used as an
> > abstraction.
> > Rouven