Create the Paymill model

@param string $class
@param string $id
@return mixed
511596
public function createModel($class, $id)
    {
        $this->model = new $class();

        if ($id) {
            $this->model->setId($id);
        }

        return $this;
    }
423517
public static function createFromStdClass(stdClass $class)
	{
		$hash = isset($class->hash) ? $class->hash : null;
		$scope = isset($class->scope) ? $class->scope : null;
		$action = isset($class->action) ? $class->action : null;
		$data = isset($class->data) ? $class->data : null;
		$state = isset($class->state) ? $class->state : null;
		$ip = isset($class->ip) ? $class->ip : null;
		$useragent = isset($class->useragent) ? $class->useragent : null;
		$createdAt = isset($class->created_at) ? $class->created_at : null;

		return new Action($hash, $scope, $action, $data, $state, $ip, $useragent, $createdAt);
	}
1056459
public static function create($class, EntityManager $entityManager)
    {
        $rc = new \ReflectionClass($class);
        $interface = 'Blast\CoreBundle\CodeGenerator\CodeGeneratorInterface';
        if (!$rc->implementsInterface($interface)) {
            throw new \RuntimeException("Class $class should implement $interface");
        }
        $codeGenerator = new $class();
        $codeGenerator::setEntityManager($entityManager);

        return $codeGenerator;
    }
123470
public function get(string $class, Identity $identity): object
    {
        $meta = ($this->metadata)($class);
        $generator = $this
            ->generators
            ->get($meta->identity()->type());

        if ($generator->knows($identity->value())) {
            $identity = $generator->for($identity->value());
        } else {
            $generator->add($identity);
        }

        if ($this->container->contains($identity)) {
            return $this->container->get($identity);
        }

        $match = ($this->match)($meta, $identity);
        $entities = $this->execute(
            $match->query(),
            $match->variables()
        );

        if ($entities->size() !== 1) {
            throw new EntityNotFound;
        }

        return $entities->current();
    }
463436
public function buildTabs( $id, $class = NULL )
	{
		if( empty( $class ) && !empty( $this->options['navClass'] ) )
			$class	= $this->options['navClass'];
		return self::createTabs( $id, $this->tabs, $this->divs, $class );
	}
1080009
protected function relayLoadModels(ClassMetadata $class, $manager, array $ids)
    {
        $data    = array();
        $stacker = function ($id, $object) use (&$data) {
            $data[$id] = $object;
        };

        $this->loaderModels($class, $manager, $ids, $stacker);

        return $data;
    }
1178657
public function make($class)
    {
        $controller = $this->container->make($class);
        $controller->setServer($this->makeServer());
        $controller->setView($this->makeView());
        $controller->setSession($this->makeSession());
        $controller->setUrlGenerator($this->makeUrlGenerator());

        return $controller;
    }
777306
private function createPaymillMethod(array $data)
    {
        $paymentMethod = new PaymillMethod();
        $paymentMethod
            ->setApiToken($data['api_token'])
            ->setCreditCardNumber($data['credit_card_1'] . $data['credit_card_2'] . $data['credit_card_3'] . $data['credit_card_4'])
            ->setCreditCardOwner($data['credit_card_owner'])
            ->setCreditCardExpirationMonth($data['credit_card_expiration_month'])
            ->setCreditCardExpirationYear($data['credit_card_expiration_year'])
            ->setCreditCardSecurity($data['credit_card_security']);

        return $paymentMethod;
    }
8137
public static function createObject($class, ...$args) : object
    {
        $work = self::wrapObject($class);
        $work->__gentryConstruct(...$args);
        return $work;
    }
363682
private static function key($class, array $id)
    {
        $class = strtolower(ltrim($class, '\\'));
        ksort($id);

        $key = '';
        foreach ($id as $prop => $val) {
            if ($key) {
                $key .= ';';
            }
            $key .= "{$prop}:{$val}";
        }

        return $class . '@' . $key;
    }
829416
public function newInstance($class)
    {
        /** @var $form AbstractForm */
        $form = new $class;
        $form->setBaseDependencies(new Builder, new FilterFactory, new HelperLocatorFactory);
        $form->postConstruct();

        return $form;
    }
49679
public static function getObjectTag($class, $id)
    {
        if (is_object($class) && $class instanceof ActiveRecord) {
            $class = $class->className();
        } elseif (!is_string($class)) {
            throw new InvalidParamException('Param $class must be a string or an object.');
        }
        return $class . '[ObjectTag:' . self::getCacheKeyById($id) . ']';
    }
1137003
protected function createMigration($class)
    {
        $this->includeMigrationFile($class);

        return $this->app->createObject([
            '__class' => $class,
            'db' => $this->db,
            'compact' => $this->compact,
        ]);
    }
818053
public static function get($id){
		$class_name = get_called_class();
		if( !isset(self::$instances[$class_name]) ){
			self::$instances[$class_name] = [];
		}
		if( !isset(self::$instances[$class_name][$id]) ){
			self::$instances[$class_name][$id] = new $class_name($id);
		}
		return self::$instances[$class_name][$id];
	}
832696
public function buildService($class)
    {
        $options = [
            'var_dir' => $this->configResolver->getParameter('var_dir'),
            'storage_dir' => $this->configResolver->getParameter('storage_dir'),
            'draft_images_dir' => $this->configResolver->getParameter('image.versioned_images_dir'),
            'published_images_dir' => $this->configResolver->getParameter('image.published_images_dir'),
        ];

        return new $class($this->publishedIOService, $this->draftIOService, $options);
    }
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];
    }
228544
protected function _create($class, $alias, $config)
    {
        $instance = new $class($this->_collection, $config);
        $enable = isset($config['enabled']) ? $config['enabled'] : true;
        if ($enable) {
            $this->eventManager()->on($instance);
        }
        $methods = $this->_getMethods($instance, $class, $alias);
        $this->_methodMap += $methods['methods'];
        $this->_finderMap += $methods['finders'];

        return $instance;
    }