public function notify($state = null)
	{
		assert($state === null || is_int($state));
		$this->_state = intval($state) ?: $this->_state;

		/** @var \SplObserver $observer */
		foreach ($this->_observers as $observer)
		{
			$observer->update($this);
		}
	}
public function notify($state = null)
	{
		assert($state === null || is_int($state));
		$this->_state = intval($state) ?: $this->_state;

		/** @var \SplObserver $observer */
		foreach ($this->_observers as $observer)
		{
			$observer->update($this);
		}
	}
public function notify ( $ state = null ) { assert ( $ state === null || is_int ( $ state ) ) ; $ this -> _state = intval ( $ state ) ? : $ this -> _state ; /** @var \SplObserver $observer */ foreach ( $ this -> _observers as $ observer ) { $ observer -> update ( $ this ) ; } }
Notify any observers about state change.

@param null|int $state
Notify any observers about state change .