本文整理汇总了PHP中Notification::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Notification::__construct方法的具体用法?PHP Notification::__construct怎么用?PHP Notification::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notification
的用法示例。
在下文中一共展示了Notification::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($objId = null, $action = null, $NotificationId = null, $autoSave = true)
{
# We call super, because there are some essential steps that need to be performed
# before we start (also this is used when retrieving an existing Object from DB)
parent::__construct($NotificationId);
# If we want to create a new Notification
if ($objId) {
$this->Controller = "notes";
$this->CreatorUserId = HTTPSession::getInstance()->GetUserID();
$this->ObjectId = $objId;
$this->ObjectType = "Note";
$this->ProjectId = HTTPSession::getInstance()->PROJECT_ID;
$this->Action = $action;
# We have just set the values above, however unless we use set methods, DataBoundObject
# won't recognize these as modified, therefore we have to add them to modified relations table
$this->arModifiedRelations['Controller'] = "1";
$this->arModifiedRelations['CreatorUserId'] = "1";
$this->arModifiedRelations['ObjectId'] = "1";
$this->arModifiedRelations['ObjectType'] = "1";
$this->arModifiedRelations['ProjectId'] = "1";
$this->arModifiedRelations['Action'] = "1";
# Save the notification
if ($autoSave) {
$this->Save();
}
}
}
示例2:
/**
* @param $Keys array with keys 'userid', 'occid'.
*/
function __construct($Keys, $Extra = NULL)
{
parent::__construct(self::$notTypeInfo, $Keys);
if (NULL !== $Extra) {
$CI =& get_instance();
$this->SetData('Custom', '<p>Summary: <strong><a href="' . site_url($Extra['link']) . $CI->uri->uri_string() . '">' . xml_escape($Extra['name']) . '</a></strong>');
}
}
示例3: __construct
/**
* Debug constructor.
*
* @param Label $label
* @param Message $message
* @param Context $context
*/
public function __construct(Label $label, Message $message, Context $context)
{
$type = new Type(TypeList::DEBUG);
parent::__construct($label, $message, $type, $context);
}
示例4: __construct
public function __construct()
{
parent::__construct();
}
示例5: __construct
/**
* Constructor
*
*@param name Ignored and forced to NAME.
*@param body the <code>Notification</code> body. (optional)
*@param type the type of the <code>Notification</code> (optional)
*/
public function __construct($name, $body = null)
{
parent::__construct(ViewTestNote::NAME, $body);
}
示例6: __construct
/**
* @param array $notification
*/
protected function __construct(array $notification)
{
parent::__construct($notification);
\Brosland\Chain\Utils::checkRequiredFields(self::$REQUIRED, $notification);
}