yii\gii\CodeFile::__construct PHP Метод

__construct() публичный Метод

Constructor.
public __construct ( string $path, string $content, array $config = [] )
$path string the file path that the new code should be saved to.
$content string the newly generated code content.
$config array name-value pairs that will be used to initialize the object properties
    public function __construct($path, $content, $config = [])
    {
        parent::__construct($config);
        $this->path = strtr($path, '/\\', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR);
        $this->content = $content;
        $this->id = md5($this->path);
        if (is_file($path)) {
            $this->operation = file_get_contents($path) === $content ? self::OP_SKIP : self::OP_OVERWRITE;
        } else {
            $this->operation = self::OP_CREATE;
        }
    }