public function setObject( $object, $throwExceptionOnFailure = true )
    {

        // tasks only work on objects
        if( !is_object($object) ) {
            throw new BadTaskException("A task must be object");
            return false;
        }

        $error = null;

        if( $isCompatible = static::isCompatible( $object, $error ) ) {
            $this->object = $object;
            return true;
        }

        if( $throwExceptionOnFailure ) {
            throw new BadTaskException("{$error}");
        }
        return false;

    }
public function setObject( $object, $throwExceptionOnFailure = true )
    {

        // tasks only work on objects
        if( !is_object($object) ) {
            throw new BadTaskException("A task must be object");
            return false;
        }

        $error = null;

        if( $isCompatible = static::isCompatible( $object, $error ) ) {
            $this->object = $object;
            return true;
        }

        if( $throwExceptionOnFailure ) {
            throw new BadTaskException("{$error}");
        }
        return false;

    }
public function setObject ( $ object , $ throwExceptionOnFailure = true ) { // tasks only work on objects if ( ! is_object ( $ object ) ) { throw new BadTaskException ( "A task must be object" ) ; return false ; } $ error = null ; if ( $ isCompatible = static :: isCompatible ( $ object , $ error ) ) { $ this -> object = $ object ; return true ; } if ( $ throwExceptionOnFailure ) { throw new BadTaskException ( "{$error}" ) ; } return false ; }
Set a task's object property

@param object $object
@param booly Throw exception if the even we can't set the object

@return Were we able to set this property
Set a task s object property