yii\test\FixtureTrait::getFixture PHP 메소드

getFixture() 공개 메소드

Returns the named fixture.
public getFixture ( string $name ) : Fixture
$name string the fixture name. This can be either the fixture alias name, or the class name if the alias is not used.
리턴 Fixture the fixture object, or null if the named fixture does not exist.
    public function getFixture($name)
    {
        if ($this->_fixtures === null) {
            $this->_fixtures = $this->createFixtures(array_merge($this->globalFixtures(), $this->fixtures()));
        }
        $name = ltrim($name, '\\');
        return isset($this->_fixtures[$name]) ? $this->_fixtures[$name] : null;
    }