public function setUser($user)
    {
        if (!($user instanceof $this->userClassName)) {
            throw new \Parable\Framework\Exception("Invalid object provided, type {$this->userClassName} required.");
        }
        $this->user = $user;
        return $this;
    }
public function setUser($user)
    {
        if (!($user instanceof $this->userClassName)) {
            throw new \Parable\Framework\Exception("Invalid object provided, type {$this->userClassName} required.");
        }
        $this->user = $user;
        return $this;
    }
public function setUser ( $ user ) { if ( ! ( $ user instanceof $ this -> userClassName ) ) { throw new \ Parable \ Framework \ Exception ( "Invalid object provided, type {$this->userClassName} required." ) ; } $ this -> user = $ user ; return $ this ; }
Set the user and check whether it's of the right type.

@param $user

@return $this
@throws \Parable\Framework\Exception
Set the user and check whether it s of the right type .