Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Swoole\Component; abstract class Observer implements \SplSubject { /*..
Decoded Output download
<?php
namespace Swoole\Component;
abstract class Observer implements \SplSubject
{
/**
* @var \SplObjectStorage
*/
protected $_observers;
/**
*
* @param \SplObserver $observer
*/
function attach(\SplObserver $observer)
{
if ($this->_observers == null)
{
$this->_observers = new \SplObjectStorage();
}
$this->_observers->attach($observer);
}
/**
*
* @param \SplObserver $observer
*/
public function detach(\SplObserver $observer)
{
if ($this->_observers == null)
{
return;
}
$this->_observers->detach($observer);
}
/**
*
*/
public function notify()
{
if ($this->_observers == null)
{
return;
}
foreach ($this->_observers as $observer)
{
/**
* @var $observer \SplObserver
*/
$observer->update($this);
}
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace Swoole\Component;
abstract class Observer implements \SplSubject
{
/**
* @var \SplObjectStorage
*/
protected $_observers;
/**
*
* @param \SplObserver $observer
*/
function attach(\SplObserver $observer)
{
if ($this->_observers == null)
{
$this->_observers = new \SplObjectStorage();
}
$this->_observers->attach($observer);
}
/**
*
* @param \SplObserver $observer
*/
public function detach(\SplObserver $observer)
{
if ($this->_observers == null)
{
return;
}
$this->_observers->detach($observer);
}
/**
*
*/
public function notify()
{
if ($this->_observers == null)
{
return;
}
foreach ($this->_observers as $observer)
{
/**
* @var $observer \SplObserver
*/
$observer->update($this);
}
}
}
Function Calls
None |
Stats
MD5 | ddf0526492b569381b4cff2dfc5ab74a |
Eval Count | 0 |
Decode Time | 80 ms |