Lithium101 is an unofficial community resource for the Lithium PHP framework indexing articles, tutorials, code snippets and libraries.
Tracking 261 plugins, categorised and sorted. If you are the plugin owner you can edit the status and category.
So far there are 54 Lithium related snippets. It's super easy to add your gists as snippets on the site, if there is anything you think might be interesting or helpful take a minute to share it.
Optimise assignTo call in DocumentSet::_set() Calling method_exists() against $data when it is not an object triggers an autoloader lookup, which in turn calls realpath(). When initialising large data sets, this can bring a heavy IO burden. Since assignTo() is always called against an object instance, we can safely prevent a call to method_exists() if $data is not an object.
@nateabele This fixes a regression I've introduced. davidpersson
Is someone still working in this? I'm looking for this feature right now and unfortunately the gist link from two years ago is no longer valid. :( 2chg
@davidpersson Seems good to me. nateabele
@davidpersson Weren't you going to make some change to the cache adapters so that they used direct invocation rather than returning a function? nateabele
:+1: We also do have this use case quite often, for own adapters, that are used to simplify interfaces. Usually, we use one particular adapter more often. Would like to see this (because it is an addition and not breaking changes). d1rk