當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ky_assure_positive_int函數代碼示例

本文整理匯總了PHP中ky_assure_positive_int函數的典型用法代碼示例。如果您正苦於以下問題:PHP ky_assure_positive_int函數的具體用法?PHP ky_assure_positive_int怎麽用?PHP ky_assure_positive_int使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ky_assure_positive_int函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: parseData

 protected function parseData($data)
 {
     $this->id = ky_assure_positive_int($data['id']);
     $this->title = ky_assure_string($data['title']);
     $this->visibility_type = ky_assure_string($data['visibilitytype']);
     $this->news_item_count = ky_assure_positive_int($data['newsitemcount'], 0);
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:7,代碼來源:kyNewsCategory.php

示例2: parseData

 protected function parseData($data)
 {
     $this->id = ky_assure_positive_int($data['id']);
     $this->template_group_id = ky_assure_positive_int($data['tgroupid']);
     $this->user_id = ky_assure_positive_int($data['userid']);
     $this->email = ky_assure_string($data['email']);
     $this->is_validated = ky_assure_bool($data['isvalidated']);
     $this->user_group_id = ky_assure_positive_int($data['usergroupid']);
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:9,代碼來源:kyNewsSubscriber.php

示例3: setParentCommentId

 /**
  * Sets identifier of parent comment (comment that this comment is a reply to).
  *
  * @param int $parent_comment_id Identifier of parent comment (comment that this comment is a reply to).
  * @return $this
  */
 public function setParentCommentId($parent_comment_id)
 {
     $this->parent_comment_id = ky_assure_positive_int($parent_comment_id);
     $this->parent_comment = null;
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:12,代碼來源:kyCommentBase.php

示例4: setEditedStaffId

 /**
  * Sets identifier of staff user, the editor of this troubleshooterstep item update.
  *
  * @param int $staff_id Staff user identifier.
  * @return kyTroubleshooterStep
  */
 public function setEditedStaffId($staff_id)
 {
     $this->edited_staff_id = ky_assure_positive_int($staff_id);
     $this->edited_staff = null;
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:12,代碼來源:kyTroubleshooterStep.php

示例5: setStaffId

 /**
  * Sets identifier of staff user, the creator of this post.
  *
  * @param int $staff_id Staff user identifier.
  * @return kyTicketPost
  */
 public function setStaffId($staff_id)
 {
     $this->staff_id = ky_assure_positive_int($staff_id);
     $this->creator = $this->staff_id > 0 ? self::CREATOR_STAFF : null;
     $this->staff = null;
     $this->user_id = null;
     $this->user = null;
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:15,代碼來源:kyTicketPost.php

示例6: setCreatorStaffId

 /**
  * Sets the identifier of staff user that creates the time track.
  *
  * @param int $creator_staff_id Identifier of staff user that creates the time track.
  * @return kyTicketTimeTrack
  */
 public function setCreatorStaffId($creator_staff_id)
 {
     $this->creator_staff_id = ky_assure_positive_int($creator_staff_id);
     $this->creator_staff = null;
     return $this;
 }
開發者ID:TecSecret,項目名稱:whmcs-integration,代碼行數:12,代碼來源:kyTicketTimeTrack.php

示例7: setKbarticleId

 /**
  * Sets KnowledgebaseArticle identifier.
  *
  * @param int $kbarticle_id KnowledgebaseArticle identifier.
  * @return kyKnowledgebaseArticle
  */
 public function setKbarticleId($kbarticle_id)
 {
     $this->kbarticle_id = ky_assure_positive_int($kbarticle_id);
     $this->kbarticle = null;
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:12,代碼來源:kyKnowledgebaseComment.php

示例8: setStaffGroupId

 /**
  * Sets staff group identifier for the staff user.
  *
  * @param int $staff_group_id Staff group identifier.
  * @return kyStaff
  */
 public function setStaffGroupId($staff_group_id)
 {
     $this->staff_group_id = ky_assure_positive_int($staff_group_id);
     $this->staff_group = null;
     return $this;
 }
開發者ID:TecSecret,項目名稱:whmcs-integration,代碼行數:12,代碼來源:kyStaff.php

示例9: setTicketPostId

 /**
  * Sets identifier of the ticket post this attachment will be attached to.
  * @param int $ticket_post_id Ticket post identifier.
  * @return kyTicketAttachment
  */
 public function setTicketPostId($ticket_post_id)
 {
     $this->ticket_post_id = ky_assure_positive_int($ticket_post_id);
     $this->ticket_post = null;
     return $this;
 }
開發者ID:TecSecret,項目名稱:whmcs-integration,代碼行數:11,代碼來源:kyTicketAttachment.php

示例10: parseData

 protected function parseData($data)
 {
     $this->id = intval($data['id']);
     $this->title = $data['title'];
     $this->display_order = intval($data['displayorder']);
     $this->department_id = ky_assure_positive_int($data['departmentid']);
     $this->display_icon = $data['displayicon'];
     $this->type = $data['type'];
     $this->mark_as_resolved = ky_assure_bool($data['markasresolved']);
     $this->display_count = ky_assure_bool($data['displaycount']);
     $this->status_color = $data['statuscolor'];
     $this->status_bg_color = $data['statusbgcolor'];
     $this->reset_due_time = ky_assure_bool($data['resetduetime']);
     $this->trigger_survey = ky_assure_bool($data['triggersurvey']);
     $this->staff_visibility_custom = ky_assure_bool($data['staffvisibilitycustom']);
     if ($this->staff_visibility_custom && is_array($data['staffgroupid'])) {
         foreach ($data['staffgroupid'] as $staff_group_id) {
             $this->staff_group_ids[] = intval($staff_group_id);
         }
     }
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:21,代碼來源:kyTicketStatus.php

示例11: setNewsItemId

 /**
  * Sets news item identifier.
  *
  * @param int $news_item_id News item identifier.
  * @return kyNewsComment
  */
 public function setNewsItemId($news_item_id)
 {
     $this->news_item_id = ky_assure_positive_int($news_item_id);
     $this->news_item = null;
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:12,代碼來源:kyNewsComment.php

示例12: setTroubleshooterStepId

 /**
  * Sets identifier of the TroubleshooterStep this attachment will belong to.
  *
  * @param int $troubleshooter_step_id TroubleshooterStep identifier.
  * @return kyTroubleshooterAttachment
  */
 public function setTroubleshooterStepId($troubleshooter_step_id)
 {
     $this->troubleshooter_step_id = ky_assure_positive_int($troubleshooter_step_id);
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:11,代碼來源:kyTroubleshooterAttachment.php

示例13: setStaffId

 /**
  * Sets staff Id of the knowledgebase category.
  *
  * @param string $staff_id of the knoledgebase category.
  * @return kyKnowledgebaseCategory
  */
 public function setStaffId($staff_id)
 {
     $this->staff_id = ky_assure_positive_int($staff_id);
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:11,代碼來源:kyKnowledgebaseCategory.php

示例14: parseData

 protected function parseData($data)
 {
     $this->id = intval($data['id']);
     $this->title = $data['title'];
     $this->display_order = intval($data['displayorder']);
     $this->department_id = ky_assure_positive_int($data['departmentid']);
     $this->display_icon = $data['displayicon'];
     $this->type = $data['type'];
     $this->user_visibility_custom = ky_assure_bool($data['uservisibilitycustom']);
     if ($this->user_visibility_custom && is_array($data['usergroupid'])) {
         foreach ($data['usergroupid'] as $user_group_id) {
             $this->user_group_ids[] = intval($user_group_id);
         }
     }
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:15,代碼來源:kyTicketType.php

示例15: setCategoryIds

 /**
  * Sets categories (using their identifiers) for this news item.
  *
  * @param int[] $category_ids Identifiers of categories for this news item.
  * @return kyNewsItem
  */
 public function setCategoryIds($category_ids)
 {
     //normalization to array
     if (!is_array($category_ids)) {
         if (is_numeric($category_ids)) {
             $category_ids = array($category_ids);
         } else {
             $category_ids = array();
         }
     }
     //normalization to positive integer values
     $this->category_ids = array();
     foreach ($category_ids as $category_id) {
         $category_id = ky_assure_positive_int($category_id);
         if ($category_id === null) {
             continue;
         }
         $this->category_ids[] = $category_id;
     }
     return $this;
 }
開發者ID:vitalyzhakov,項目名稱:php-api-library,代碼行數:27,代碼來源:kyNewsItem.php


注:本文中的ky_assure_positive_int函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。