private function create_package_migration($name) {
		list($packagename, $name) = explode('/', $name);

		$skeleton_packages = \Skeleton\Core\Skeleton::get_all();
		$package = null;
		foreach ($skeleton_packages as $skeleton_package) {
			if ($skeleton_package->name == $packagename) {
				$package = $skeleton_package;
			}
		}

		if ($package === null) {
			throw new \Exception('Package ' . $packagename . ' not found');
		}

		if (!file_exists($package->migration_path)) {
			mkdir($package->migration_path);
		}

		$name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $name);

		$datetime = date('Ymd_His');
		$filename = $datetime . '_' . strtolower($name) . '.php';
		$classname = 'Migration_' . $datetime . '_' . ucfirst($name);

		$namespace_parts = explode('-', $package->name);
		foreach ($namespace_parts as $key => $namespace_part) {
			$namespace_parts[$key] = ucfirst($namespace_part);
		}
		$namespace = implode('\\', $namespace_parts);

		$template = file_get_contents(__DIR__ . '/../template/migration.php');
		$template = str_replace('%%namespace%%', 'namespace ' . $namespace . ';' . "\n", $template);
		$template = str_replace('%%classname%%', $classname, $template);
		file_put_contents($package->migration_path . '/' . $filename, $template);
		return $package->migration_path . '/' . $filename;
	}
private function create_package_migration($name) {
		list($packagename, $name) = explode('/', $name);

		$skeleton_packages = \Skeleton\Core\Skeleton::get_all();
		$package = null;
		foreach ($skeleton_packages as $skeleton_package) {
			if ($skeleton_package->name == $packagename) {
				$package = $skeleton_package;
			}
		}

		if ($package === null) {
			throw new \Exception('Package ' . $packagename . ' not found');
		}

		if (!file_exists($package->migration_path)) {
			mkdir($package->migration_path);
		}

		$name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $name);

		$datetime = date('Ymd_His');
		$filename = $datetime . '_' . strtolower($name) . '.php';
		$classname = 'Migration_' . $datetime . '_' . ucfirst($name);

		$namespace_parts = explode('-', $package->name);
		foreach ($namespace_parts as $key => $namespace_part) {
			$namespace_parts[$key] = ucfirst($namespace_part);
		}
		$namespace = implode('\\', $namespace_parts);

		$template = file_get_contents(__DIR__ . '/../template/migration.php');
		$template = str_replace('%%namespace%%', 'namespace ' . $namespace . ';' . "\n", $template);
		$template = str_replace('%%classname%%', $classname, $template);
		file_put_contents($package->migration_path . '/' . $filename, $template);
		return $package->migration_path . '/' . $filename;
	}
private function create_package_migration ( $ name ) { list ( $ packagename , $ name ) = explode ( '/' , $ name ) ; $ skeleton_packages = \ Skeleton \ Core \ Skeleton :: get_all ( ) ; $ package = null ; foreach ( $ skeleton_packages as $ skeleton_package ) { if ( $ skeleton_package -> name == $ packagename ) { $ package = $ skeleton_package ; } } if ( $ package === null ) { throw new \ Exception ( 'Package ' . $ packagename . ' not found' ) ; } if ( ! file_exists ( $ package -> migration_path ) ) { mkdir ( $ package -> migration_path ) ; } $ name = preg_replace ( array ( '/\s/' , '/\.[\.]+/' , '/[^\w_\.\-]/' ) , array ( '_' , '.' , '' ) , $ name ) ; $ datetime = date ( 'Ymd_His' ) ; $ filename = $ datetime . '_' . strtolower ( $ name ) . '.php' ; $ classname = 'Migration_' . $ datetime . '_' . ucfirst ( $ name ) ; $ namespace_parts = explode ( '-' , $ package -> name ) ; foreach ( $ namespace_parts as $ key => $ namespace_part ) { $ namespace_parts [ $ key ] = ucfirst ( $ namespace_part ) ; } $ namespace = implode ( '\\' , $ namespace_parts ) ; $ template = file_get_contents ( __DIR__ . '/../template/migration.php' ) ; $ template = str_replace ( '%%namespace%%' , 'namespace ' . $ namespace . ';' . "\n" , $ template ) ; $ template = str_replace ( '%%classname%%' , $ classname , $ template ) ; file_put_contents ( $ package -> migration_path . '/' . $ filename , $ template ) ; return $ package -> migration_path . '/' . $ filename ; }
Create package migration

@access private
@param string $name
@return string $path
Create package migration