This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace common\service; | |
| use yii\base\Component; | |
| class RequestCrawlerService extends Component | |
| { | |
| const EVENT_INFO_AFTER_SAVE = 'infoAfterSave'; | |
| /** @var object $serializer */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Yii::$container->set(\common\service\SerializerInterface::class, \common\service\JsonSerializer::class); | |
| Yii::$container->set('requestCrawler', [ | |
| 'class' => \common\service\RequestCrawlerService::class, | |
| 'pathToSave' => dirname(__DIR__) . '/file', | |
| 'on infoAfterSave' => [\common\service\Test::className(), 'info'] | |
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace common\service; | |
| use Yii; | |
| use yii\base\Component; | |
| class RequestCrawlerService extends Component | |
| { | |
| const EVENT_INFO_AFTER_SAVE = 'infoAfterSave'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> ошибка нету указания типа текущего документа | |
| строка 4 нету закрывающего тега </head> | |
| строка 6 <?php echo << text >> ; ?> ошибка в кавычках надо ('', "") и в нутри тега <body> надо выводить текст в тегах <div>,<p> итдп. | |
| строка 7 нету закрывающего тега </h1> | |
| строка 8 нету закрывающего тега </h1> и кавычки надо ('', "") | |
| строка 9 ошибка : надо ; или , | |
| строка 13 print < <<END ошибка пробел! надо <<<END END; | |
| строка 16 ошибка нету закрывающего тега </pre> | |
| строка 18 $s = < <<END ошибка пробел! | |
| строка 20 ошибка нету закрывающего тега </pre> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| abstract class Animal | |
| { | |
| /** | |
| * @var Animal|string $name | |
| */ | |
| protected $name; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| final class Palindrome | |
| { | |
| /** @var string $string */ | |
| private $string; | |
| /** @var string $oneLongString */ | |
| private $oneLongString; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\modules\admin\models; | |
| use yii\db\ActiveRecord; | |
| class Active extends ActiveRecord | |
| { | |
| public static function getDb() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class A | |
| { | |
| static public $name = 'zir4onah'; | |
| static public function name() | |
| { | |
| return static::$name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** example */ | |
| $text = function (string $text) { | |
| return $text; | |
| }; | |
| $text('hello'); //return hello | |
| $text = 'sum = '; | |
| //в use можно передать несколько переменных function() use($var1, $var2) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Booked extends \yii\db\ActiveRecord | |
| { | |
| /** @var $sum integer */ | |
| public $sum; | |
| /** @var $countBookedRoom integer */ | |
| public $countBookedRoom; | |
| /** @var $countPayment integer */ | |
| public $countPayment; | |
| /** @var $numberRoom integer */ |