Get a module instance
@param string type
@param string name
@return Module
2869
public static function get($type, $name)
    {

        return ModuleCompiler::get($type, $name) ?: static::where('type', $type)->where('name', $name)->first();
    }
279226
function _get_plugin_filepath($type, $name)
	{
		$_params = array('type' => $type, 'name' => $name);
		require_once(SMARTY_CORE_DIR . 'core.assemble_plugin_filepath.php');
		return smarty_core_assemble_plugin_filepath($_params, $this);
	}
1135310
public function getModuleByName($name)
    {
        $modules = $this->getModuleRepository();
        if ($modules->has($name) === false) {
            throw new RuntimeException("Module [$name] does not exists.");
        }

        return $modules->find($name);
    }
848376
public function make($type, $name)
    {
        if (!in_array(strtolower($type), $this->type)) {
            echo "{$type} must is {$this->stringSuport}";
            return false;
        }
        $data = $this->bindData($type, $name);
        $file = @fopen($name . '.php', 'w+');

        if ($file) {
            return fwrite($file, $data);
        } else {
            die("permission error!\n");
        }

    }
458563
private function getExtension($type, $name)
    {
        if (!$this->extensions[$type]) {
            $this->discoverExtension($type);
        }

        if (array_key_exists($name, $this->extensions[$type])) {
            return $this->extensions[$type][$name];
        }

        return null;
    }
1011046
public static function get_mod_name($type) {
        static $types;

        if (!is_array($types)) {
            global $DB;
            $types = $DB->get_records('modules');
        }

        return $types[$type]->name;
    }
879944
function _getModuleConstructor(name) {
  var constructor = Agent.modules[name];
  if (!constructor) {
    throw new Error('Unknown module "' + name + '". ' +
        'Choose from: ' + Object.keys(Agent.modules).map(JSON.stringify).join(', '));
  }
  return constructor;
}
562882
public function getModule($name){
        if($this->loadModules != 'ALL' && !in_array($name, $this->loadModules)){
            $this->connection->select('k.url, k.method');
            $this->connection->from($this->tableModule . ' m');
            $this->connection->join($this->tableKey . ' k', 'm.id = k.moduleId');
            $this->connection->where('m.name = :name', array('name' => $name));
            $module= $this->connection->get()->fetchAll(\PDO::FETCH_ASSOC);
            $this->modules[$name]= $module;
            $this->loadModules[]= $name;
        }
        return $this->modules[$name];
    }
193450
protected function getStub($name, $type)
    {
        if (stripos($name, '.php') === false) {
            $name = $name . '.php';
        }

        return $this->filesystem->get($this->getStubsPath($type) . '/' . $name);
    }
1292612
protected function getDefinitionFile($type, $name)
    {
        if (array_key_exists($name, $this->definitionFiles)) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = null;
        $this->definitionFiles[$name] = $this->findDefinitionFileByComposer($name);

        if (null !== $this->definitionFiles[$name]) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = $this->findDefinitionFileByName($name);

        if (null !== $this->definitionFiles[$name]) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = $this->findDefinitionFileByRegex($type, $name);

        return $this->definitionFiles[$name];
    }
360413
public function getOption($name, $type = null)
    {
        $type = $type ?: $this->getTypeByName($name);
        if (!isset($this->options[$name]) && class_exists($name)) {
            $name = array_search($name, $this->mapping[$type]) ?: $name;
        }
        if (!isset($this->options[$name])) {
            $option = $this->createOption($name, $type);
            $name = $option->getName();
            $this->options[$name] = $option;
            if (!isset($this->mapping[$type][$name])) {
                $this->mapping[$type][$name] = get_class($option);
            }
        }

        return $this->options[$name];
    }
967609
static function CreateModule($type, ModuleLocation $location)
    {
        $class = self::ModuleClass($type, $location);
        if (!class_exists($class))
        {
            return null;
        }
        return new $class();
    }
367691
public static function build($name, $type)
	{
		$factory = new BuildFactory(self::config($name), $type);
		$buildNode = $factory->build();
		$buildNode->build();
		return $buildNode->getNodes();
	}
1289262
public function addParam($name, $type = null)
    {
        $this->params[(string)$name] = $type;
        return $this;
    }
1227216
public function get_module( $name ) {
		if ( null === $name ) {
			return false;
		}
		if ( isset( $this->modules[ $name ] ) ) {
			return $this->modules[ $name ];
		}
		$name = "\\{$name}";
		if ( isset( $this->modules[ $name ] ) ) {
			return $this->modules[ $name ];
		}

		return false;
	}
1241470
public static function getByName($name) {
		
		$db = Database::getInstance();
		$db->setQuery('SELECT * FROM `modules` WHERE name = ?');
		return $db->loadObject($name);
		
	}
631976
public function get($name)
    {
        return isset($this->modules[$name]) ? $this->modules[$name] : null;
    }