return an instance of the correct class type for the filter identified by $id.

@param int $id

@return TdbShopShippingGroupHandler
968768
public static function &GetInstance($id)
    {
        $oInstance = null;
        $query = "SELECT * FROM `shop_shipping_group_handler` WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($id)."'";
        if ($row = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
            $sClassName = $row['class'];
            $oInstance = new $sClassName();
            /** @var $oInstance TdbShopShippingGroupHandler */
            $oInstance->LoadFromRow($row);
        }

        return $oInstance;
    }
1130642
public static function getByID($id)
    {
        $record = static::getRecordByField(static::$primaryKey ? static::$primaryKey : 'ID', $id, true);

        return static::instantiateRecord($record);
    }
1079339
public function removeClass($id)
    {
        if (isset($this->classes[$id])) {
            unset($this->classes[$id]);
        }
        if (isset($this->items[$id])) {
            unset($this->items[$id]);
        }
        return $this;
    }
321378
public function getType($id)
    {
        if (null === $id) {
            // The caller might call us using a row from database that contains
            // a strict null, it is useless for us to do any query since null
            // typed messages are valid by the MessageInterface signature
            return null;
        }

        if (null === $this->types) {
            $this->loadCache();
        }

        if (!isset($this->types[$id])) {
            // Someone may have created it before we loaded the cache
            $this->loadCache();

            if (!isset($this->types[$id])) {
                // It seems that the type really does not exists, mark it as
                // being wrong in order to avoid to refresh the cache too often
                // and return a null type
                $this->types[$id] = false;
            }
        }

        if (false === $this->types[$id]) {
            return null;
        } else {
            return $this->types[$id];
        }
    }
75258
public function getFromGroupWithChartType($id)
    {
        $query = $this->createQueryBuilder('c')
            ->join('c.libs', 'lib')
            ->addSelect('lib')
            ->join('lib.type', 'type')
            ->addSelect('type')
            ->where('c.idGroup = :idGroup')
            ->setParameter('idGroup', $id);

        return $query->getQuery()->getResult();
    }
801297
protected function getInstances($id, $interface)
    {
        if (isset($this->instances[$id])) {
            return $this->instances[$id];
        }

        $this->instances[$id] = [];

        if (! $this->hasOption($id)) {
            return $this->instances[$id];
        } else {
            foreach ($this->getOption($id) as $instance) {
                if (is_a($instance, $interface, true)) {
                    $this->instances[$id][] = new $instance();
                }
            }
        }
        return $this->instances[$id];
    }
1276105
public static function get_instance($id, $type) {

        switch ($type) {
            case 'site':
            case 'course':
            case 'module':
                return new blog_filter_context($id, $type);
                break;

            case 'group':
            case 'user':
                return new blog_filter_user($id, $type);
                break;

            case 'tag':
                return new blog_filter_tag($id);
                break;

            default:
                $classname = "blog_filter_$type";
                if (class_exists($classname)) {
                    return new $classname($id, $type);
                }
        }
    }
1109840
public function getChannelGroupOrDMByID($id)
    {
        if ($id[0] === 'D') {
            return $this->getDMById($id);
        }

        if ($id[0] === 'G') {
            return $this->getGroupById($id);
        }

        return $this->getChannelById($id);
    }
43655
public function get( $id ) {
		if ( isset( $this->types[ $id ] ) ) {
			return $this->types[ $id ];
		}

		return null;
	}
707935
public function box($id) {
        if (!$this->has($id)) {
            throw new Cargo\Exception\NotFoundException("Box '$id' was not defined.");
        }

        return $this->boxes[$id];
    }
89718
public static function getInstance($id)
    {
        $instance = NULL;
        if (array_key_exists($id, self::$_instances))
        {
            $instance = self::$_instances[$id];
        }
        else
        {
            $instance = self::$_current_instance;
        }

        if (is_null($instance))
        {
            throw new \Exception('No instance found for datatable, you should set a datatable id in your
            action with "setDatatableId" using the id from your view ');
        }

        return $instance;
    }
440522
public static function instance($id = 'datatable')
    {
        $cls = get_called_class();
        if (!isset(self::$instance[$id])) {
            self::$instance[$id] = new $cls($id);
        }

        return self::$instance[$id];
    }
14937
public function getById($id)
    {
        return new View(
            $this->getContext(),
            new ResourcePathServiceOperation($this->getContext(),$this->getResourcePath(),"getById",array($id))
        );
    }
322754
public function findById($className, $id)
    {
        return $this->factory->createTransaction()->findByReference(new Reference($className, $id));
    }
564797
public function getInstance($id)
    {
        if (!\in_array($id, $this->adminServiceIds, true)) {
            $msg = sprintf('Admin service "%s" not found in admin pool.', $id);
            $shortest = -1;
            $closest = null;
            $alternatives = [];
            foreach ($this->adminServiceIds as $adminServiceId) {
                $lev = levenshtein($id, $adminServiceId);
                if ($lev <= $shortest || $shortest < 0) {
                    $closest = $adminServiceId;
                    $shortest = $lev;
                }
                if ($lev <= \strlen($adminServiceId) / 3 || false !== strpos($adminServiceId, $id)) {
                    $alternatives[$adminServiceId] = $lev;
                }
            }
            if (null !== $closest) {
                asort($alternatives);
                unset($alternatives[$closest]);
                $msg = sprintf(
                    'Admin service "%s" not found in admin pool. Did you mean "%s" or one of those: [%s]?',
                    $id,
                    $closest,
                    implode(', ', array_keys($alternatives))
                );
            }
            throw new \InvalidArgumentException($msg);
        }

        $admin = $this->container->get($id);

        if (!$admin instanceof AdminInterface) {
            throw new InvalidArgumentException(sprintf('Found service "%s" is not a valid admin service', $id));
        }

        return $admin;
    }
329879
static function getInstance($id = null)
    {
        $key = empty($id) ? 'default' : $id;
        if (Core::$enableCoroutine)
        {
            return new static($id);
        }
        if (empty(self::$_instances[$key]))
        {
            $object = new static($id);
        }
        else
        {
            $object = self::$_instances[$key];
        }
        return $object;
    }
205733
public function find($id)
    {
        return $this->filter(function (Contract $stat) use ($id) {
            return $stat->getSkill()->getId() === $id;
        })->first();
    }