A while ago (two years ago pretty much) I wrote about Diablo 3 when they released some gameplay videos, teasers, and so on. Now the existence of D3 is becoming much more of a reality, and it is pants-wettingly exciting. Word on the street is that there is a closed beta going on. Chances are pretty high that I won’t get an invite, but here’s hoping, eh?
I’ve gotta say, having briefly skimmed through Day9′s D3 stream from yesterday, I am really excited. I just hope it lives up to my expectations. Bear in mind, I still play Diablo 2+exp quite often (although I wouldn’t say I’m a hardcore player by any means), D2 has set the bar incredibly high. It’s one of my favourite games of all time, and I really hope that the D3 release won’t just be spurned by rabid D2 fans finding out that D3 is a pile of tosh (ahem – WoW).
So – read more about Diablo 3 here, or read the Beta announcement and opt-in FAQs.
SO EXCITING!
Yep – this morning I took and passed my first Zend Certified Engineer qualification. As with all the candidates, we are bound by a Non Disclosure Agreement, but my tip for anyone wanting to take the exam is to practise and revise more. I found the questions much trickier than I thought they were going to be (based off the PHP5 mock tests I had left), but rightfully so. Good times people!
Oh yes, by the way I know the link doesn’t work yet, but I’m informed it can take 24-48 hours for my Zend Yellow Pages entry to become live… It’s live now
Simples:
<?php
// IN THE FORM
$field->addPrefixPath('NS_Validate_', '../library/NS/Validate', 'validate');
$field->setLabel('Enter one')
->setRequired(true)
->addValidator('ValueEqualsOne');
// In library/NS/Validate/ValueEqualsOne.php
class NS_Validate_ValueEqualsOne extends Zend_Validate_Abstract
{
const DOESEQUALONE = 'doesequalone';
protected $_messageTemplates = array(
self::DOESEQUALONE => "This value does not equal one",
);
public function isValid($value)
{
$this->_setValue($value);
if($value == 1)
return true;
$this->_error();
return false;
}
}
I’m not sure yet how to get around having to do the addPrefixPath call every time, but I’ll have to do some hacking I guess…
Jasper made some breakfast this morning and it looked good. So me and Freyja went to the shop and got our own breakfast, which I have to say is much better. Purely because our sausages were made out of real meat. And ours has bacon. Real bacon. Mmmm bacon. Bacon is good. And toast. The only thing that’s not as good is the picture, but I’m no photographer, so I used my camera phone.

I also thought I’d throw in a picture of Kali and Freyja for luck. Freyja is shown here modelling her new buoyancy aid that her Granny (my Mum) bought for her to go swimming in France.

Kali couldn’t resist getting in the picture either, although I’m not sure she realises what it’s all about. She’s definitely a puppy, and more than a handful. Taking her on walks is a real struggle, but I’m sure we’ll get there. She’s only 15 weeks old bless her, but my she’s growing! In fact, this is her like 5 minutes ago:

If you’re wondering what the white powder is all over her head, it’s not dandruff, it’s sand from Freyja’s sand table we were playing with earlier and Kali decided to roll in some sand that had fallen off. Silly puppy!
I have a nasty habit of not adding base URLs to my projects because I never think about anyone else who might use it. Anyway, you can get the base URL like this:
In a Controller
$this->getFrontController()->getBaseUrl()
In a View script
Reminder really, nothing more. It would be nice to know if there was a less long winded way of getting the base URL everywhere though…