options example

 else {
            $hostname = ($persistent === true) ? 'p:' . $this->hostname : $this->hostname;
            $port     = empty($this->port) ? null : $this->port;
            $socket   = '';
        }

        $clientFlags  = ($this->compress === true) ? MYSQLI_CLIENT_COMPRESS : 0;
        $this->mysqli = mysqli_init();

        mysqli_report(MYSQLI_REPORT_ALL & ~MYSQLI_REPORT_INDEX);

        $this->mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10);

        if ($this->numberNative === true) {
            $this->mysqli->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 1);
        }

        if (isset($this->strictOn)) {
            if ($this->strictOn) {
                $this->mysqli->options(
                    MYSQLI_INIT_COMMAND,
                    "SET SESSION sql_mode = CONCAT(@@sql_mode, ',', 'STRICT_ALL_TABLES')"
                );
            }
<?php
namespace Symfony\Component\Routing\Loader\Configurator;

return function DRoutingConfigurator $routes) {
    $routes
        ->collection()
        ->add('foo', '/foo')
            ->condition('abc')
            ->options(['utf8' => true])
        ->add('buz', 'zub')
            ->controller('foo:act')
            ->stateless(true)
        ->add('controller_class', '/controller')
            ->controller(['Acme\MyApp\MyController', 'myAction']);

    $routes->import('php_dsl_sub.php')
        ->prefix('/sub')
        ->requirements(['id' => '\d+']);

    $routes->import('php_dsl_sub.php')
        
public static function createTransport(HttpClientInterface $client = null): GoIpTransport
    {
        return (new GoIpTransport('user', 'pass', 4, $client ?? new MockHttpClient()))
            ->setHost('host.test')
            ->setPort(4000);
    }

    public static function supportedMessagesProvider(): iterable
    {
        $message = new SmsMessage('0611223344', 'Hello!');
        $message->options((new GoIpOptions())->setSimSlot(3));

        yield [$message];
    }

    public static function unsupportedMessagesProvider(): iterable
    {
        yield [new ChatMessage('Hello!')];
        yield [new DummyMessage()];
    }

    /** * @throws TransportExceptionInterface */
<?php
namespace Symfony\Component\Routing\Loader\Configurator;

return new class() {
    public function __invoke(RoutingConfigurator $routes)
    {
        $routes
            ->collection()
            ->add('foo', '/foo')
            ->condition('abc')
            ->options(['utf8' => true])
            ->add('buz', 'zub')
            ->controller('foo:act')
            ->stateless(true)
            ->add('controller_class', '/controller')
            ->controller(['Acme\MyApp\MyController', 'myAction']);

        $routes->import('php_dsl_sub.php')
            ->prefix('/sub')
            ->requirements(['id' => '\d+']);

        $routes->import('php_dsl_sub.php')
            
use Symfony\Config\NodeInitialValuesConfig;

return static function DNodeInitialValuesConfig $config) {
    $config->someCleverName(['second' => 'foo', 'third' => null])->first('bar');
    $config->messenger()
        ->transports('fast_queue', ['dsn' => 'sync://'])
        ->serializer('acme');

    $config->messenger()
        ->transports('slow_queue')
        ->dsn('doctrine://')
        ->options(['table' => 'my_messages']);
};
Home | Imprint | This part of the site doesn't use cookies.