/** * [rename description] * * @method rename * * @param [type] $to [description] * * @return [type] [description] */ public function rename($to) { $dir = $this->store->getDir(); if (fnmatch('*.*', $to)) { list($newDb, $newTable) = explode('.', $to, 2); } else { $newDb = SITE_NAME; $newTable = $to; } $new = new self($newDb, $newTable); $newDir = $new->store->getDir(); File::mvdir($dir, $newDir); return $new; }