Skip to content

Instantly share code, notes, and snippets.

View flangofas's full-sized avatar
🎯
Focusing

Antonis Flangofas flangofas

🎯
Focusing
View GitHub Profile
@flangofas
flangofas / observers.php
Last active August 29, 2015 14:12 — forked from mt3o/observers.php
<?php
class MyObserver implements SplObserver {
public function update(SplSubject $subject) {
echo __CLASS__ . ' - ' . $subject->getName();
}
}
class MySubject implements SplSubject {
private $_observers;
<?php
// CORE/app/models/datasources/json_source.php
/**
* JSON Source module for CakePHP.
*
* @package cake
*/