当前位置: 首页>>代码示例>>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;未经允许,请勿转载。