Being in New Zealand does strange things to a person. Everybody who knows me, knows I don’t much like that crazy invention called a Book. However, being here I’ve already finished 4 books, all of which I can highly recommend.
Next up: Design Patterns: Elements of Reusable Object-Oriented Software, by the Gang of Four. Yes, talk about classics and shame on me for not having ordered it sooner! Also reading Implementation Patterns, by Kent Beck at the moment.
A while ago I was daydreaming about native property support in PHP. Unfortunately it will be a while before PHP itself will support this natively and an even longer while before shared hosting providers will upgrade to a newer version of PHP.
So what’s the big deal about those properties? In short, they make a developers life easier by allowing the developer to code no more than needed at that moment. And lets face it… less code is better! In this post we’ll see that it’s not impossible to enjoy properties in PHP today. As with a lot of good things, it does come with a small price though…
Read more…
Zend_Paginator has a new feature! It is now possible to add a filter to your Paginator object which acts on the data retrieved from the adapter. This filter can be any instance of Zend_Filter_Interface, including a filter-chain. If a filter(-chain) is set, the raw data from the adapter will be passed to the filter() method.
Read more…
Zend_Db_Table_Select users, rejoice! I’ve just committed a patch for ZF-3239 in revision 13530. This should be a relief for those of you who have been implementing workarounds for those “No table has been specified for the FROM clause” exceptions.
After browsing through WordPress’ code I quickly found that there’s no sane way to create AMF support as a WP plugin. At least not for someone who hasn’t done any old-skool procedural PHP in years. Instead of writing a plugin, I decided to write a standalone server script. It’s still very basic and currently setup to work for me. To get it working for your WP setup you should probably make some minor modifications. Click the read more link to check out the code. I’ve released it under the generous BSD license, so knock yourself out! Use it at your own risk… I’m not going to support it. Any updates will be posted in this post. Also, please note that I haven’t tested it yet. If you access the script directly it should output “Zend Amf Endpoint” just fine, but that’s all I can guarantee at this point
Read more…
I was planning on writing a quick Flex frontend for this blog, but it appears WordPress only offers the posts themselves as RSS feed. If I get real bored (which I doubt, unfortunately) I’ll have a look and see if I can create a Zend_AMF plugin for WordPress that allows me to retrieve virtually all data from my WordPress install. Would be cool
A while ago Dynom from #php_bnl pointed me to an interesting entry on the PHP 5.3 wiki page. In the “Future PHP releases” sections there’s an entry called “29. “real” properties with attached getters and setters”. Personally I can’t wait for this. Hopefully it will look something like ActionScript 3′s properties:
<?php
class Bar
{
private $_foo = 'foo';
public function get foo()
{
return $this->_foo;
}
public function set foo($fooString)
{
$this->_foo = $fooString;
}
}
$bar = new Bar();
$bar->foo = 'baz';
echo $bar->foo; // prints baz