/** * Filter out other class and set only class to seed. * * @param $class */ public function executeOnly($class) { /* | We will check if user requesting for seeding multiple table | Then we will filter out only those class to seed from the | specified seeder array */ if ($exp = string_split($class, ',')) { $this->seeders = $this->filterClass($exp); } else { $hasClass = in_array($class, $this->seeders) ? true : false; if ($hasClass) { $this->seeders = $this->filterClass([$class]); } } }
/** * @param $args */ private function setModuleConfiguration($args) { $param = string_split($args[1], '@'); $this->bootstrapModule($args[0]); $this->setControllerConfig($args, $param, true); }
/** * Returns the Translator array for a given language. * * // Get all defined Spanish messages * $messages = $trans->load('es'); * * @param string $locale language to load * * @return array */ public function load($locale) { if (isset($this->cache[$locale])) { return $this->cache[$locale]; } // New Translator array $trans = []; // Split the language: language, region, locale, etc $parts = string_split($locale, '-'); do { // Create a path for this set of parts $path = implode(DS, $parts); // Remove the last part if ($files = $this->findLanguageFile($path)) { $trans = $this->loadMessages($files, $trans); } array_pop($parts); } while ($parts); // Cache the Translator table locally return $this->cache[$locale] = $trans; }