public function statusEquals($status=null)
	{
		if( ! empty($status)) {
			try {
				$oStatus = $this->ensureStatusInstance($status);
			}catch(Exception $e) {
				return false;
			}
		} else {
			$status = $oStatus = null;
		}
		
		if ( $oStatus == null) {
			return ! $this->hasWorkflowStatus();
		} elseif( $this->hasWorkflowStatus()) {
			return $this->getWorkflowStatus()->getId() == $oStatus->getId();
		} else {
			return false;
		}
	}
public function statusEquals($status=null)
	{
		if( ! empty($status)) {
			try {
				$oStatus = $this->ensureStatusInstance($status);
			}catch(Exception $e) {
				return false;
			}
		} else {
			$status = $oStatus = null;
		}
		
		if ( $oStatus == null) {
			return ! $this->hasWorkflowStatus();
		} elseif( $this->hasWorkflowStatus()) {
			return $this->getWorkflowStatus()->getId() == $oStatus->getId();
		} else {
			return false;
		}
	}
public function statusEquals ( $ status = null ) { if ( ! empty ( $ status ) ) { try { $ oStatus = $ this -> ensureStatusInstance ( $ status ) ; } catch ( Exception $ e ) { return false ; } } else { $ status = $ oStatus = null ; } if ( $ oStatus == null ) { return ! $ this -> hasWorkflowStatus ( ) ; } elseif ( $ this -> hasWorkflowStatus ( ) ) { return $ this -> getWorkflowStatus ( ) -> getId ( ) == $ oStatus -> getId ( ) ; } else { return false ; } }
Tests if the current status is equal to the status passed as argument.

TRUE is returned when :

- $status is empty and the owner model has no current status
- $status is not empty and refers to the same status as the current one

All other condition return FALSE.

This method can be invoked passing a string or a [[Status]] instance argument.

Example :
<pre>
$post->statusEquals('draft');
$post->statusEquals($otherPost->getWorkflowStatus());
</pre>

@param Status|string $status the status to test
@return boolean
Tests if the current status is equal to the status passed as argument .