Create an instance of the CallFire driver.

@return CallFireSMS
342128
protected function createCallfireDriver()
    {
        $config = $this->app['config']->get('sms.callfire', []);

        $provider = new CallFireSMS(
            new Client(),
            $config['app_login'],
            $config['app_password']
        );

        return $provider;
    }
1317602
public function create()
    {
        $loaders = array();

        if (count($this->xmlMappings) > 1) {
            $loaders[] = new XmlFilesLoader($this->xmlMappings, $this->constraintNamespaces);
        } elseif (1 === count($this->xmlMappings)) {
            $loaders[] = new XmlFileLoader($this->xmlMappings[0], $this->constraintNamespaces);
        }

        if (count($this->yamlMappings) > 1) {
            $loaders[] = new YamlFilesLoader($this->yamlMappings, $this->constraintNamespaces);
        } elseif (1 === count($this->yamlMappings)) {
            $loaders[] = new YamlFileLoader($this->yamlMappings[0], $this->constraintNamespaces);
        }

        foreach ($this->methodMappings as $methodName) {
            $loaders[] = new StaticMethodLoader($methodName);
        }

        if ($this->annotationReader) {
            $loaders[] = new AnnotationLoader($this->annotationReader);
        }

        $loader = null;

        if (count($loaders) > 1) {
            $loader = new LoaderChain($loaders);
        } elseif (1 === count($loaders)) {
            $loader = $loaders[0];
        }

        return new LazyLoadingMetadataFactory($loader, $this->metadataCache);
    }
465666
public function rutes() {
        $this->resList = $this->resListCallBack->map(function (HttpCallBack $call) {
            return new HttpCallBack(
                $call->getMethod(),    
                $this->actual.$call->getPath(),
                $call->getFn()
            );
            
        });
    }
325525
protected function makeCallable()
    {
        if ($this->call instanceof Closure || $this->isFunction()) {
            return $this->call;
        }

        if ($this->isStaticMethod()) {
            return [$this->getCallClass(), $this->getCallMethod()];
        }

        return [$this->getCallInstance(), $this->getCallMethod()];

    }
439314
public function createTarFileSet()
    {
        $this->fileset = new TarFileSet();
        $this->filesets[] = $this->fileset;

        return $this->fileset;
    }
55520
private function createInstance()
    {
        if ($this->arguments === null) {
            $this->arguments = [];

            if (null !== ($method = $this->getReflection()->getConstructor())) {
                $this->arguments = $this->getArguments($method);
            }
        }

        return $this->getReflection()->newInstanceArgs($this->arguments);
    }
538606
private function createDriver()
    {
        if (is_string($this->config['driver'])) {
            $drivername = ucfirst($this->config['driver']);
            $driverclass = sprintf('Intervention\\Image\\%s\\Driver', $drivername);

            if (class_exists($driverclass)) {
                return new $driverclass;
            }

            throw new \Intervention\Image\Exception\NotSupportedException(
                "Driver ({$drivername}) could not be instantiated."
            );
        }

        if ($this->config['driver'] instanceof AbstractDriver) {
            return $this->config['driver'];
        }

        throw new \Intervention\Image\Exception\NotSupportedException(
            "Unknown driver type."
        );
    }
718451
public function create()
    {

        $callback = $this->callback;

        if (is_callback_function($callback)) {
            $callback($this);
        }

        $params = [

            'index' => $this->name,

            'body' => [
                "settings" => [
                    'number_of_shards' => $this->shards,
                    'number_of_replicas' => $this->replicas
                ]
            ],

            'client' => [
                'ignore' => $this->ignores
            ]
        ];

        if (count($this->mappings)) {
            $params["body"]["mappings"] = $this->mappings;
        }

        return $this->connection->indices()->create($params);
    }
1252606
protected function createNexmoDriver()
    {
        return new Channels\NexmoSmsChannel(
            new NexmoClient(new NexmoCredentials(
                $this->app['config']['services.nexmo.key'],
                $this->app['config']['services.nexmo.secret']
            )),
            $this->app['config']['services.nexmo.sms_from']
        );
    }
1194083
public static function create()
    {
        return parent::create()
            ->setSerializationContextFactory(array(self::class, 'createDefaultSerializationContext'))
            ->addDefaultHandlers()
            ->configureListeners(function (EventDispatcher $dispatcher) {
                $proxySubscriber = new DoctrineProxySubscriber(false);
                $dispatcher->addSubscriber($proxySubscriber);
            })
            ->configureHandlers(function (HandlerRegistryInterface $handlerRegistry) {
                $proxyHandler = new DoctrineProxyHandler();
                $handlerRegistry->registerSubscribingHandler($proxyHandler);
            })
        ;
    }
132017
public function create()
    {
        // Event
        $this->triggerEvent('onBefore' . ucfirst(__FUNCTION__), []);

        $this->triggerEvent('onBeforeStore');

        // Do Action
        $this->getDataMapper()->createOne($this);

        // Event
        $this->triggerEvent('onAfterStore');

        $this->triggerEvent('onAfter' . ucfirst(__FUNCTION__));

        return $this;
    }
83107
protected function createDatabaseDriver()
    {
        $connection = $this->getDatabaseConnection();
        $connection->getReadPdo();
        $table = $this->app['config']['session.table'];
        return $this->buildSession(new DatabaseSessionHandler($connection, $table, $this->app));

    }
799190
private function createStreamCallback()
    {
        $read =& $this->readListeners;
        $write =& $this->writeListeners;
        $this->streamCallback = function ($stream, $flags) use (&$read, &$write) {
            $key = (int) $stream;

            if (Event::READ === (Event::READ & $flags) && isset($read[$key])) {
                \call_user_func($read[$key], $stream);
            }

            if (Event::WRITE === (Event::WRITE & $flags) && isset($write[$key])) {
                \call_user_func($write[$key], $stream);
            }
        };
    }
582821
public function build()
    {
        $callback = $this->callback;

        // We will create a new class metadata builder instance,
        // so we can use it to easily generated a new mapping
        // array, without re-declaring the existing association
        $builder = $this->newClassMetadataBuilder();
        $source = $this->convertToMappingArray($this->builder);

        if (!isset($this->relations[$source['type']])) {
            throw new InvalidArgumentException('Only ManyToMany and ManyToOne relations can be overridden');
        }

        // Create a new association builder, based on the given type
        $associationBuilder = $this->getAssociationBuilder($builder, $source);

        // Give the original join table name, so we won't
        // accidentally remove custom join table names
        if ($this->hasJoinTable($source)) {
            $associationBuilder->setJoinTable($source['joinTable']['name']);
        }

        $association = $callback($associationBuilder);

        // When the user forget to return, use the $associationBuilder instance
        // which contains the same information
        $association = $association ?: $associationBuilder;

        if (!$association instanceof Relation) {
            throw new InvalidArgumentException('The callback should return an instance of '.Relation::class);
        }

        $association->build();

        $target = $this->convertToMappingArray($builder);

        $overrideMapping = [];

        // ManyToMany mappings
        if ($this->hasJoinTable($target)) {
            $overrideMapping['joinTable'] = $this->mapJoinTable(
                $target['joinTable'],
                $source['joinTable']
            );
        }

        // ManyToOne mappings
        if ($this->hasJoinColumns($target)) {
            $overrideMapping['joinColumns'] = $this->mapJoinColumns(
                $target['joinColumns'],
                $source['joinColumns']
            );
        }

        $this->builder->getClassMetadata()->setAssociationOverride(
            $this->name,
            $overrideMapping
        );
    }
429289
protected function createStackDriver()
    {
        $determiners = (new Collection((array) $this->app['config']['localize-middleware']['driver']))
            ->filter(function ($driver) {
                return $driver !== 'stack';
            })
            ->map(function ($driver) {
                return $this->driver($driver)->setFallback(null);
            });

        return (new Determiners\Stack($determiners))
            ->setFallback($this->app['config']['app']['fallback_locale']);
    }
913768
public function build(): EvaluateOnCallFrameRequest
	{
		$instance = new EvaluateOnCallFrameRequest();
		if ($this->callFrameId === null) {
			throw new BuilderException('Property [callFrameId] is required.');
		}
		$instance->callFrameId = $this->callFrameId;
		if ($this->expression === null) {
			throw new BuilderException('Property [expression] is required.');
		}
		$instance->expression = $this->expression;
		$instance->objectGroup = $this->objectGroup;
		$instance->includeCommandLineAPI = $this->includeCommandLineAPI;
		$instance->silent = $this->silent;
		$instance->returnByValue = $this->returnByValue;
		$instance->generatePreview = $this->generatePreview;
		$instance->throwOnSideEffect = $this->throwOnSideEffect;
		$instance->timeout = $this->timeout;
		return $instance;
	}
1252586
protected function createNewConnection(): \Plasma\DriverInterface {
        $connection = $this->factory->createDriver();
        
        // We relay a driver's specific events forward, e.g. PostgreSQL notifications
        $connection->on('eventRelay', function (string $eventName, ...$args) use (&$connection) {
            $args[] = $connection;
            $this->emit($eventName, $args);
        });
        
        $connection->on('close', function () use (&$connection) {
            $this->connections->delete($connection);
            $this->busyConnections->delete($connection);
            
            $this->emit('close', array($connection));
        });
        
        $connection->on('error', function (\Throwable $error) use (&$connection) {
            $this->emit('error', array($error, $connection));
        });
        
        $connection->connect($this->uri)->then(function () use (&$connection) {
            $this->connections->add($connection);
            $this->busyConnections->delete($connection);
        }, function (\Throwable $error) use (&$connection) {
            $this->connections->delete($connection);
            $this->busyConnections->delete($connection);
            
            $this->emit('error', array($error, $connection));
        });
        
        return $connection;
    }