<commit_before><?php defined('SYSPATH') OR die('No direct access allowed.');
/**
 * Interfaced migration driver
 *
 * @package		Migration
 * @author		<NAME>
 * @uses		DBForge
 * @copyright	(c) 2009 <NAME>
 * @license		MIT
 */
class Migration_Interface extends Migration {
	
	protected function _get_model($model)
	{
		return $model;
	}
	
	protected function _get_database()
	{
		$this->_model->get_database();
	}
	
	protected function _get_tables()
	{
		$this->_model->get_tables();
	}
	
} // End Migration_Interface<commit_msg>Fixed migratable interface to reflect API changes.<commit_after><?php defined('SYSPATH') OR die('No direct access allowed.');
/**
 * Interfaced migration driver
 *
 * @package		Migration
 * @author		<NAME>
 * @uses		DBForge
 * @copyright	(c) 2009 <NAME>
 * @license		MIT
 */
class Migration_Interface extends Migration {
	
	protected function _model($model)
	{
		// If the model is given as a string, instantiate it.
		if (is_string($model))
		{
			$model = Model::factory($model);
		}
		
		// If the model does not implement the migratable interface, this driver can't control it.
		if ( ! $model instanceof Model_Migratable)
		{
			// Throw an error if it doesnt.
			throw new Kohana_Exception('Model :mdl does not implement the Model_Migratable interface', array(
				':mdl' => (string)$model
			));
		}
		
		// Return the model object
		return $model;
	}
	
	protected function _db()
	{
		// Returns the interfaced object's database
		return $this->_model->db();
	}
	
	protected function _tables()
	{
		//
		return $this->_model->migration_tables();
	}
	
} // End Migration_Interface
{'fraction_non_alphanumeric': 0.12639405204460966, 'fraction_numerical': 0.004956629491945477, 'mean_word_length': 3.6408045977011496, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '221566', 'n_tokens_mistral': 564, 'n_tokens_neox': 506, 'n_words': 149}