コード例 #1
0
ファイル: ParseRole.php プロジェクト: uday21/order
 public function save($useMasterKey = false)
 {
     if (!$this->getACL()) {
         throw new ParseException("Roles must have an ACL.");
     }
     if (!$this->getName() || !is_string($this->getName())) {
         throw new ParseException("Roles must have a name.");
     }
     return parent::save($useMasterKey);
 }
コード例 #2
0
ファイル: ParseUser.php プロジェクト: louk/One-Nice-Thing
 /**
  * Save the current user object, unless it is not signed up.
  *
  * @throws ParseException
  *
  * @return null
  */
 public function save($useMasterKey = false)
 {
     if ($this->getObjectId()) {
         parent::save($useMasterKey);
     } else {
         throw new ParseException("You must call signUp to create a new User.");
     }
 }