PHP Classes

File: src/templates/fixture_class.php

Recommend this page to a friend!
  Classes of Insolita   Yii2 Fixture ii   src/templates/fixture_class.php   Download  
File: src/templates/fixture_class.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Yii2 Fixture ii
Generate fixture code files from templates scripts
Author: By
Last change:
Date: 2 months ago
Size: 497 bytes
 

Contents

Class file image Download
<?php
/**
 * The following variables are available in this view:
 * @var \insolita\fixturegii\generators\ClassGenerator $generator
 */
use yii\helpers\StringHelper;

echo
"<?php\n";
?>
use <?=ltrim($generator->parentClass,'\\')?>;

class <?=StringHelper::basename($generator->classNs)?> extends <?=StringHelper::basename($generator->parentClass)?>

{
      public $modelClass = '<?=$generator->modelClass?>';
      public $dataFile = '<?=$generator->fixturePath?>';
      public $depends = [];
}