if(round($change) < 0 and $prev_value and $current_value) $arr_cons[$change *100 + 1] = $change_text.' '.$this->randomValue(['понизились параметры', 'понизелос качество', 'ухудшелось качество']).' селфи '.$this->randomValue(['камеры', 'фото', 'фотографий', 'снимков']).''; if(round($change) == 0 and $prev_value and $current_value) $arr_eqv[] = 'качество селфи'; $prev_value = $prev_model->details_number_20 + $prev_model->details_number_41; $current_value = $model->details_number_20 + $model->details_number_41; $change = (($current_value - $prev_value)/$prev_value)*20; if($change > 10) $change = 10; if($change < -10) $change = -10; $change_text = $arr_strong_temp[abs(round($change))]; unset($arr_strong_temp[abs(round($change))]); if(round($change) > 0 and $prev_value and $current_value) $arr_pros[$change *100 + 2] = $change_text.' '.$this->randomValue(['поднялись параметры', 'поднялось качество', 'улучшилось качество']).' '.$this->randomValue(['фото', 'фотографий', 'снимков']).' у основной камеры'; if(round($change) < 0 and $prev_value and $current_value) $arr_cons[$change *100 + 2] = $change_text.' '.$this->randomValue(['понизились параметры', 'понизелос качество', 'ухудшелось качество']).' '.$this->randomValue(['фото', 'фотографий', 'снимков']).' у основной камеры'; if(round($change) == 0 and $prev_value and $current_value) $arr_eqv[] = 'качество основной камеры';
$prev_value = $prev_model->details_number_20 + $prev_model->details_number_41; $current_value = $model->details_number_20 + $model->details_number_41; $change = (($current_value - $prev_value)/$prev_value)*20; if($change > 10) $change = 10; if($change < -10) $change = -10; $change_text = $arr_strong_temp[abs(round($change))]; unset($arr_strong_temp[abs(round($change))]); if(round($change) > 0 and $prev_value and $current_value) $arr_pros[$change *100 + 2] = $change_text.' '.$this->randomValue(['поднялись параметры', 'поднялось качество', 'улучшилось качество']).' '.$this->randomValue(['фото', 'фотографий', 'снимков']).' у основной камеры';
*/ public function __get($name) { $getter = 'get' . $name; if (method_exists($this, $getter)) { // read property, e.g. getName() return $this->$getter(); } else { // behavior property $this->ensureBehaviors(); foreach ($this->_behaviors as $behavior) { if ($behavior->canGetProperty($name)) { return $behavior->$name;
{ $color['color11']='success'; $color['color1']='warning'; $color['color']='danger'; foreach($this->generatedArray['begin'] as $html_block){ if($html_block['text']){ $h2 = $html_block['h2']; if($html_block['score'] !== null) $h2 .= ' <span class="badge progress-bar-'.$color['color'.($html_block['score']>600).($html_block['score']>300)].' badge-score">'.round($html_block['score']/100).' из 10</span>'; if($html_block['h2']) $generated_html.=('<hr><h2>'.$h2.'</h2>'); $generated_html.=(''.implode(' ', $html_block['text']).'<br>'); }
*/ public function __get($name) { $getter = 'get' . $name; if (method_exists($this, $getter)) { // read property, e.g. getName() return $this->$getter(); } else { // behavior property $this->ensureBehaviors(); foreach ($this->_behaviors as $behavior) { if ($behavior->canGetProperty($name)) { return $behavior->$name;
} if(($review->date_updated < time()-60*60*24*30 and $review->status_id<2)){ $review->body = $review_local->generatedHtml; $review->seo_description = $review_local->generatedSeoDescription; $review->short_body = $review_local->generatedShortBody; $review->status_id++; $review->date_updated = time();
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
$config = yii\helpers\ArrayHelper::merge( require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../config/main.php') ); $application = new yii\web\Application($config); $application->run();
$_GET = [ 'id' => '16898', 'seo' => 'cubot-note-7', ];