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 | |
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
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\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
Lesson #2 | |
Домашнее задание: | |
1. Еще раз читаем доку по гиту, разбираемся с основными командами для работы с гитом. | |
2. На сайте гитхаба создаем новый репозиторий для дз№2 | |
3. Читаем об композере https://getcomposer.org/ | |
4. Установить себе на комп композер | |
5. В вашем проекте к дз№2 инициализировать композер. | |
6. Установить несколько пхп библиотек (минимум 2) через композер и написать небольшой скриптик, в котором вы их будете использовать. | |
7. В конфигурации к композеру должна быть обязательной проверка на версию пхп для подключаемых библиотек и минимум 2-х модулей к пхп |
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 Character | |
{ | |
public $lvl= 1; | |
public $name; | |
public $power; | |
public $intellect; | |
abstract function updateStat(); |
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 Character | |
{ | |
public $lvl= 1; | |
public $name; | |
public $power; | |
public $intellect; | |
abstract function updateStat(); |
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 Character | |
{ | |
public $lvl= 1; | |
public $character; | |
const WARRIOR = 'warrior'; | |
const MAGE = 'mage'; | |
public $stats = array( | |
self::WARRIOR => array('power' => 2 , 'intellect' => 1), | |
self::MAGE => array('power' => 1, 'intellect' => 2) |
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 Character { | |
public $name; | |
public $role; | |
public $level = 1; | |
protected $count; | |
abstract public function updateStats(); | |
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 Character { | |
protected $spells = []; | |
abstract public function getTalants(); | |
} |