本文整理汇总了PHP中ky_assure_positive_int函数的典型用法代码示例。如果您正苦于以下问题:PHP ky_assure_positive_int函数的具体用法?PHP ky_assure_positive_int怎么用?PHP ky_assure_positive_int使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ky_assure_positive_int函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: setSLAPlanExpiry
/**
* Sets expiration date of Service Level Agreement plan assignment.
*
* @see http://www.php.net/manual/en/function.strtotime.php
*
* @param string|int|null $sla_plan_expiry Date and time when Service Level Agreement plan for this user will expire (timestamp or string format understood by PHP strtotime). Null to disable expiration.
* @return kyUser
*/
public function setSLAPlanExpiry($sla_plan_expiry)
{
$this->sla_plan_expiry = is_numeric($sla_plan_expiry) || $sla_plan_expiry === null ? ky_assure_positive_int($sla_plan_expiry) : strtotime($sla_plan_expiry);
return $this;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:13,代码来源:kyUser.php
示例17: parseData
protected function parseData($data)
{
$this->id = intval($data['_attributes']['id']);
$this->type = $data['_attributes']['type'];
$this->note_color = intval($data['_attributes']['notecolor']);
$this->creator_staff_id = ky_assure_positive_int($data['_attributes']['creatorstaffid']);
$this->creator_staff_name = $data['_attributes']['creatorstaffname'];
$this->for_staff_id = ky_assure_positive_int($data['_attributes']['forstaffid']);
$this->creation_date = ky_assure_positive_int($data['_attributes']['creationdate']);
$this->contents = $data['_contents'];
if ($this->getType() === kyTicketNote::TYPE_TICKET) {
$this->ticket_id = ky_assure_positive_int($data['_attributes']['ticketid']);
} elseif ($this->getType() === kyTicketNote::TYPE_USER) {
$this->user_id = ky_assure_positive_int($data['_attributes']['userid']);
} elseif ($this->getType() === kyTicketNote::TYPE_USER_ORGANIZATION) {
$this->user_organization_id = ky_assure_positive_int($data['_attributes']['userorganizationid']);
}
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:18,代码来源:kyTicketNote.php
示例18: setTemplateGroupId
/**
* Sets the template group identifier.
* Resets template group name.
*
* @param int $template_group_id Template group identifier.
* @return kyTicket
*/
public function setTemplateGroupId($template_group_id)
{
$this->template_group_id = ky_assure_positive_int($template_group_id);
$this->template_group_name = null;
return $this;
}
开发者ID:vitalyzhakov,项目名称:php-api-library,代码行数:13,代码来源:kyTicket.php
示例19: setTroubelshooterStepId
/**
* Sets the troubleshooterstep Id.
*
* @param int $troubleshooterstep_item_id TroubleshooterStep identifier
*
* @return $this
*/
public function setTroubelshooterStepId($troubleshooterstep_item_id)
{
$this->troubleshooterstep_item_id = ky_assure_positive_int($troubleshooterstep_item_id);
$this->troubleshooterstep_item = null;
return $this;
}
开发者ID:vitalyzhakov,项目名称:php-api-library,代码行数:13,代码来源:kyTroubleshooterComment.php
注:本文中的ky_assure_positive_int函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论