public function setCurrentJob($value) : ScheduledJob
    {
        // Is this a scalar value representing the ID of this foreign key?
        if (is_scalar($value)) {
            return $this->setCurrentJobId($value);
        }

        // Is this an instance of CurrentJob?
        if (is_object($value) && $value instanceof Job) {
            return $this->setCurrentJobObject($value);
        }

        // Is this an array representing a Job item?
        if (is_array($value) && !empty($value['id'])) {
            return $this->setCurrentJobId($value['id']);
        }

        // None of the above? That's a problem!
        throw new \Exception('Invalid value for CurrentJob.');
    }
public function setCurrentJob($value) : ScheduledJob
    {
        // Is this a scalar value representing the ID of this foreign key?
        if (is_scalar($value)) {
            return $this->setCurrentJobId($value);
        }

        // Is this an instance of CurrentJob?
        if (is_object($value) && $value instanceof Job) {
            return $this->setCurrentJobObject($value);
        }

        // Is this an array representing a Job item?
        if (is_array($value) && !empty($value['id'])) {
            return $this->setCurrentJobId($value['id']);
        }

        // None of the above? That's a problem!
        throw new \Exception('Invalid value for CurrentJob.');
    }
public function setCurrentJob ( $ value ) : ScheduledJob { // Is this a scalar value representing the ID of this foreign key? if ( is_scalar ( $ value ) ) { return $ this -> setCurrentJobId ( $ value ) ; } // Is this an instance of CurrentJob? if ( is_object ( $ value ) && $ value instanceof Job ) { return $ this -> setCurrentJobObject ( $ value ) ; } // Is this an array representing a Job item? if ( is_array ( $ value ) && ! empty ( $ value [ 'id' ] ) ) { return $ this -> setCurrentJobId ( $ value [ 'id' ] ) ; } // None of the above? That's a problem! throw new \ Exception ( 'Invalid value for CurrentJob.' ) ; }
Set CurrentJob - Accepts an ID, an array representing a Job or a Job model.
@throws \Exception
@param $value mixed
@return ScheduledJob
Set CurrentJob - Accepts an ID an array representing a Job or a Job model .