protected function _prepareSchema($fixtureClassName)
    {
        $fixture = new $fixtureClassName;
        if (!empty($fixture->table)) {
            $tableName = $fixture->table;
        } else {
            $tableName = (string)Inflector::underscore(str_replace_last('Fixture', '', $fixtureClassName));
        }

        list($fields, $constraints, $indexes, $options) = $this->_prepareSchemaProperties($fixture);
        $schema = new TableSchema($tableName, $fields);

        foreach ($constraints as $name => $attrs) {
            $schema->addConstraint($name, $attrs);
        }

        foreach ($indexes as $name => $attrs) {
            $schema->addIndex($name, $attrs);
        }

        if (!empty($options)) {
            $schema->options($options);
        }

        return $schema;
    }
protected function _prepareSchema($fixtureClassName)
    {
        $fixture = new $fixtureClassName;
        if (!empty($fixture->table)) {
            $tableName = $fixture->table;
        } else {
            $tableName = (string)Inflector::underscore(str_replace_last('Fixture', '', $fixtureClassName));
        }

        list($fields, $constraints, $indexes, $options) = $this->_prepareSchemaProperties($fixture);
        $schema = new TableSchema($tableName, $fields);

        foreach ($constraints as $name => $attrs) {
            $schema->addConstraint($name, $attrs);
        }

        foreach ($indexes as $name => $attrs) {
            $schema->addIndex($name, $attrs);
        }

        if (!empty($options)) {
            $schema->options($options);
        }

        return $schema;
    }
protected function _prepareSchema ( $ fixtureClassName ) { $ fixture = new $ fixtureClassName ; if ( ! empty ( $ fixture -> table ) ) { $ tableName = $ fixture -> table ; } else { $ tableName = ( string ) Inflector :: underscore ( str_replace_last ( 'Fixture' , '' , $ fixtureClassName ) ) ; } list ( $ fields , $ constraints , $ indexes , $ options ) = $ this -> _prepareSchemaProperties ( $ fixture ) ; $ schema = new TableSchema ( $ tableName , $ fields ) ; foreach ( $ constraints as $ name => $ attrs ) { $ schema -> addConstraint ( $ name , $ attrs ) ; } foreach ( $ indexes as $ name => $ attrs ) { $ schema -> addIndex ( $ name , $ attrs ) ; } if ( ! empty ( $ options ) ) { $ schema -> options ( $ options ) ; } return $ schema ; }
Gets an schema instance for the given fixture class.

@param string $fixtureClassName The fixture to be "converted"
@return \Cake\Database\Schema\Table Schema instance
Gets an schema instance for the given fixture class .