for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Subscriber Device
*
* @author Alexey Krupskiy <[email protected]>
* @link http://inji.ru/
* @copyright 2015 Alexey Krupskiy
* @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
*/
namespace Notifications\Subscriber;
class Device extends \Model {
public static $logging = false;
static $cols = [
$cols
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
class A { var $property; }
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.
'key' => ['type' => 'text'],
'subscriber_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'subscriber'],
'date_last_check' => ['type' => 'dateTime'],
'date_create' => ['type' => 'dateTime'],
];
public static function indexes() {
return [
'notifications_subscriber_device_subscriber_device_key' => [
'type' => 'UNIQUE INDEX',
'cols' => [
'subscriber_device_key'
]
],
}
public static function relations() {
'subscriber' => [
'model' => 'Notifications\Subscriber',
'col' => 'subscriber_id'
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.