prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
namespace Illuminate\Database\Schema;
class MySqlBuilder extends Builder
{
/**
* Drop all tables from the database.
*
* @return void
*/
public function dropAllTables()
{
$tables = $this->getTableListing($this->getCurrentSchemaListing());
if (empty($tables)) {
... | $views = array_column($this->getViews($this->getCurrentSchemaListing()), 'schema_qualified_name');
if (empty($views)) {
return;
}
$this->connection->statement(
$this->grammar->compileDropAllViews($views)
| );
} finally {
$this->enableForeignKeyConstraints();
}
}
/**
* Drop all views from the database.
*
* @return void
*/
public function dropAllViews()
{
| {
"filepath": "src/Illuminate/Database/Schema/MySqlBuilder.php",
"language": "php",
"file_size": 1243,
"cut_index": 518,
"middle_length": 229
} |
\Database\Events\MigrationEvent as MigrationEventContract;
use Illuminate\Database\Migrations\Migration;
abstract class MigrationEvent implements MigrationEventContract
{
/**
* A migration instance.
*
* @var \Illuminate\Database\Migrations\Migration
*/
public $migration;
/**
* The... | ram \Illuminate\Database\Migrations\Migration $migration
* @param string $method
* @param string|null $name
*/
public function __construct(Migration $migration, $method, $name = null)
{
$this->method = $method;
| * Create a new event instance.
*
* @pa | {
"filepath": "src/Illuminate/Database/Events/MigrationEvent.php",
"language": "php",
"file_size": 958,
"cut_index": 582,
"middle_length": 52
} |
te\Database\Events;
class QueryExecuted
{
/**
* The SQL query that was executed.
*
* @var string
*/
public $sql;
/**
* The array of query bindings.
*
* @var array
*/
public $bindings;
/**
* The number of milliseconds it took to execute the query.
... | Type;
/**
* Create a new event instance.
*
* @param string $sql
* @param array $bindings
* @param float|null $time
* @param \Illuminate\Database\Connection $connection
* @param null|'read'|'write' $readWrit | * The database connection name.
*
* @var string
*/
public $connectionName;
/**
* The PDO read / write type for the executed query.
*
* @var null|'read'|'write'
*/
public $readWrite | {
"filepath": "src/Illuminate/Database/Events/QueryExecuted.php",
"language": "php",
"file_size": 1734,
"cut_index": 537,
"middle_length": 229
} |
Method
{
/**
* Call the given Closure / class@method and inject its dependencies.
*
* @param \Illuminate\Container\Container $container
* @param callable|string $callback
* @param array $parameters
* @param string|null $defaultMethod
* @return mixed
*
* @throws \... | ic::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMetho | string($callback) && ! $defaultMethod && method_exists($callback, '__invoke')) {
$defaultMethod = '__invoke';
}
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return stat | {
"filepath": "src/Illuminate/Container/BoundMethod.php",
"language": "php",
"file_size": 7736,
"cut_index": 716,
"middle_length": 229
} |
hp
namespace Illuminate\Container;
use Countable;
use IteratorAggregate;
use Traversable;
class RewindableGenerator implements Countable, IteratorAggregate
{
/**
* The generator callback.
*
* @var callable
*/
protected $generator;
/**
* The number of tagged services.
*
... | */
public function getIterator(): Traversable
{
return ($this->generator)();
}
/**
* Get the total number of tagged services.
*
* @return int
*/
public function count(): int
{
if (is_callable($c | ublic function __construct(callable $generator, $count)
{
$this->count = $count;
$this->generator = $generator;
}
/**
* Get an iterator from the generator.
*
* @return \Traversable
| {
"filepath": "src/Illuminate/Container/RewindableGenerator.php",
"language": "php",
"file_size": 1109,
"cut_index": 515,
"middle_length": 229
} |
space Illuminate\Container\Attributes;
use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use UnitEnum;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Authenticated implements ContextualAttribute
{
/**
* Create a new class instance.
*/
... | ntainer
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public static function resolve(self $attribute, Container $container)
{
return call_user_func($container->make('auth')->userResolver(), $attribute->guard);
} | aram \Illuminate\Contracts\Container\Container $co | {
"filepath": "src/Illuminate/Container/Attributes/Authenticated.php",
"language": "php",
"file_size": 834,
"cut_index": 523,
"middle_length": 52
} |
eString($name)
);
}
/**
* Compile the query to determine if the dbstat table is available.
*
* @return string
*/
public function compileDbstatExists()
{
return "select exists (select 1 from pragma_compile_options where compile_options = 'ENABLE_DBSTAT_VTAB') as enabl... | * @return string
*/
public function compileTableExists($schema, $table)
{
return sprintf(
'select exists (select 1 from %s.sqlite_master where name = %s and type = \'table\') as "exists"',
$this->wrapValue($sc | , name = \'main\' as "default" from pragma_database_list order by name';
}
/**
* Compile the query to determine if the given table exists.
*
* @param string|null $schema
* @param string $table
| {
"filepath": "src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php",
"language": "php",
"file_size": 36147,
"cut_index": 2151,
"middle_length": 229
} |
amespace Illuminate\Database\Events;
use Illuminate\Database\Connection;
class MigrationsPruned
{
/**
* The database connection instance.
*
* @var \Illuminate\Database\Connection
*/
public $connection;
/**
* The database connection name.
*
* @var string|null
*/
... | ion $connection
* @param string $path
*/
public function __construct(Connection $connection, string $path)
{
$this->connection = $connection;
$this->connectionName = $connection->getName();
$this->path = $path;
| .
*
* @param \Illuminate\Database\Connect | {
"filepath": "src/Illuminate/Database/Events/MigrationsPruned.php",
"language": "php",
"file_size": 836,
"cut_index": 520,
"middle_length": 52
} |
[];
/**
* The registered aliases keyed by the abstract name.
*
* @var array[]
*/
protected $abstractAliases = [];
/**
* The extension closures for services.
*
* @var array[]
*/
protected $extenders = [];
/**
* All of the registered tags.
*
*... | ual attribute handlers.
*
* @var array[]
*/
public $contextualAttributes = [];
/**
* Whether an abstract class has already had its attributes checked for bindings.
*
* @var array<class-string, true>
*/
protec | * The parameter override stack.
*
* @var array[]
*/
protected $with = [];
/**
* The contextual binding map.
*
* @var array[]
*/
public $contextual = [];
/**
* The context | {
"filepath": "src/Illuminate/Container/Container.php",
"language": "php",
"file_size": 52456,
"cut_index": 2151,
"middle_length": 229
} |
;
use Illuminate\Contracts\Container\ContextualAttribute;
use ReflectionAttribute;
use ReflectionNamedType;
/**
* @internal
*/
class Util
{
/**
* If the given value is not an array and not null, wrap it in one.
*
* From Arr::wrap() in Illuminate\Support.
*
* @param mixed $value
* ... | public static function unwrapIfClosure($value, ...$args)
{
return $value instanceof Closure ? $value(...$args) : $value;
}
/**
* Get the class name of the given parameter's type, if possible.
*
* From Reflector::getPara | }
/**
* Return the default value of the given value.
*
* From global value() helper in Illuminate\Support.
*
* @param mixed $value
* @param mixed ...$args
* @return mixed
*/
| {
"filepath": "src/Illuminate/Container/Util.php",
"language": "php",
"file_size": 2140,
"cut_index": 563,
"middle_length": 229
} |
ate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualBindingBuilder as ContextualBindingBuilderContract;
class ContextualBindingBuilder implements ContextualBindingBuilderContract
{
/**
* The underlying container instance.
*
* @var \Illuminate\Contracts\Container\Container... | c function __construct(Container $container, $concrete)
{
$this->concrete = $concrete;
$this->container = $container;
}
/**
* Define the abstract target that depends on the context.
*
* @param string $abstract
| ar string
*/
protected $needs;
/**
* Create a new contextual binding builder.
*
* @param \Illuminate\Contracts\Container\Container $container
* @param string|array $concrete
*/
publi | {
"filepath": "src/Illuminate/Container/ContextualBindingBuilder.php",
"language": "php",
"file_size": 2364,
"cut_index": 563,
"middle_length": 229
} |
tring[]
*/
protected $fluentCommands = ['Default'];
/**
* Compile the query to determine the schemas.
*
* @return string
*/
public function compileSchemas()
{
return 'select name, iif(schema_id = schema_id(), 1, 0) as [default] from sys.schemas '
."where nam... | e 1 end) as [exists]',
$this->quoteString($schema ? $schema.'.'.$table : $table)
);
}
/**
* Compile the query to determine the tables.
*
* @param string|string[]|null $schema
* @return string
*/
p | ull $schema
* @param string $table
* @return string
*/
public function compileTableExists($schema, $table)
{
return sprintf(
'select (case when object_id(%s, \'U\') is null then 0 els | {
"filepath": "src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php",
"language": "php",
"file_size": 31505,
"cut_index": 1331,
"middle_length": 229
} |
pace Illuminate\Container\Attributes;
use Attribute;
use InvalidArgumentException;
use UnitEnum;
use function Illuminate\Support\enum_value;
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
class Bind
{
/**
* The concrete class to bind to.
*
* @var class-string
*/
public s... |
*/
public function __construct(
string $concrete,
string|array|UnitEnum $environments = ['*'],
) {
$environments = array_filter(is_array($environments) ? $environments : [$environments]);
if ($environments === | ate a new attribute instance.
*
* @param class-string $concrete
* @param non-empty-array<int, \UnitEnum|non-empty-string>|non-empty-string|\UnitEnum $environments
*
* @throws \InvalidArgumentException | {
"filepath": "src/Illuminate/Container/Attributes/Bind.php",
"language": "php",
"file_size": 1320,
"cut_index": 524,
"middle_length": 229
} |
tainer\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use UnitEnum;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Cache implements ContextualAttribute
{
/**
* Create a new class instance.
*/
public function __construct(
public UnitEnum|string|null $store = null,
... | */
public static function resolve(self $attribute, Container $container)
{
return $attribute->memo
? $container->make('cache')->memo($attribute->store)
: $container->make('cache')->store($attribute->store);
| * @return \Illuminate\Contracts\Cache\Repository
| {
"filepath": "src/Illuminate/Container/Attributes/Cache.php",
"language": "php",
"file_size": 918,
"cut_index": 606,
"middle_length": 52
} |
php
namespace Illuminate\Container\Attributes;
use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use UnitEnum;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Database implements ContextualAttribute
{
/**
* Create a new class instance.
... | ate\Contracts\Container\Container $container
* @return \Illuminate\Database\Connection
*/
public static function resolve(self $attribute, Container $container)
{
return $container->make('db')->connection($attribute->connection);
| aram \Illumin | {
"filepath": "src/Illuminate/Container/Attributes/Database.php",
"language": "php",
"file_size": 792,
"cut_index": 514,
"middle_length": 14
} |
namespace Illuminate\Container\Attributes;
use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use UnitEnum;
use function Illuminate\Support\enum_value;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Log implements ContextualAttribute
{
/**
... | the log channel.
*
* @param self $attribute
* @param \Illuminate\Contracts\Container\Container $container
* @return \Psr\Log\LoggerInterface
*/
public static function resolve(self $attribute, Container $container)
{
| gs with. Only to be used with Monolog drivers.
*/
public function __construct(
public UnitEnum|string|null $channel = null,
public UnitEnum|string|null $name = null,
) {
}
/**
* Resolve | {
"filepath": "src/Illuminate/Container/Attributes/Log.php",
"language": "php",
"file_size": 1241,
"cut_index": 518,
"middle_length": 229
} |
rt\Facades\Storage;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
use InvalidArgumentException;
use RuntimeException;
class Attachment
{
use Macroable;
/**
* The attached file's filename.
*
* @var string|null
*/
public $as;
/**
* The attached file's MIM... | mail attachment from a path.
*
* @param string $path
* @return static
*/
public static function fromPath($path)
{
return new static(fn ($attachment, $pathStrategy) => $pathStrategy($path, $attachment));
}
/**
| $resolver;
/**
* Create a mail attachment.
*
* @param \Closure $resolver
*/
private function __construct(Closure $resolver)
{
$this->resolver = $resolver;
}
/**
* Create a | {
"filepath": "src/Illuminate/Mail/Attachment.php",
"language": "php",
"file_size": 6425,
"cut_index": 716,
"middle_length": 229
} |
ostmarkTransportFactory;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\FailoverTransport;
use Symfony\Component\Mailer\Transport\RoundRobinTransport;
use Symfony\Component\Mailer\Transport\SendmailTransport;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
use Symfony\Com... | d mailers.
*
* @var array
*/
protected $mailers = [];
/**
* The registered custom driver creators.
*
* @var array
*/
protected $customCreators = [];
/**
* Create a new Mail manager instance.
*
| l\Mailer
*/
class MailManager implements FactoryContract
{
/**
* The application instance.
*
* @var \Illuminate\Contracts\Foundation\Application
*/
protected $app;
/**
* The array of resolve | {
"filepath": "src/Illuminate/Mail/MailManager.php",
"language": "php",
"file_size": 19154,
"cut_index": 1331,
"middle_length": 229
} |
[];
/**
* The "to" recipients of the message.
*
* @var array
*/
public $to = [];
/**
* The "cc" recipients of the message.
*
* @var array
*/
public $cc = [];
/**
* The "bcc" recipients of the message.
*
* @var array
*/
public $bcc =... | g
*/
protected $html;
/**
* The view to use for the message.
*
* @var string
*/
public $view;
/**
* The plain text view to use for the message.
*
* @var string
*/
public $textView;
/** | */
public $subject;
/**
* The Markdown template for the message (if applicable).
*
* @var string
*/
public $markdown;
/**
* The HTML to use for the message.
*
* @var strin | {
"filepath": "src/Illuminate/Mail/Mailable.php",
"language": "php",
"file_size": 51798,
"cut_index": 2151,
"middle_length": 229
} |
Mailer implements MailerContract, MailQueueContract
{
use Macroable;
/**
* The name that is configured for the mailer.
*
* @var string
*/
protected $name;
/**
* The view factory instance.
*
* @var \Illuminate\Contracts\View\Factory
*/
protected $views;
... | bal reply-to address and name.
*
* @var array
*/
protected $replyTo;
/**
* The global return path address.
*
* @var array
*/
protected $returnPath;
/**
* The global to address and name.
*
| tance.
*
* @var \Illuminate\Contracts\Events\Dispatcher|null
*/
protected $events;
/**
* The global from address and name.
*
* @var array
*/
protected $from;
/**
* The glo | {
"filepath": "src/Illuminate/Mail/Mailer.php",
"language": "php",
"file_size": 18825,
"cut_index": 1331,
"middle_length": 229
} |
ForwardsCalls;
/**
* The Symfony Email instance.
*
* @var \Symfony\Component\Mime\Email
*/
protected $message;
/**
* CIDs of files embedded in the message.
*
* @deprecated Will be removed in a future Laravel version.
*
* @var array
*/
protected $embed... | , $name = null)
{
is_array($address)
? $this->message->from(...$this->ensureAddressesAreSafe($address))
: $this->message->from($this->createAddress($address, (string) $name));
return $this;
}
/**
* | $this->message = $message;
}
/**
* Add a "from" address to the message.
*
* @param string|array $address
* @param string|null $name
* @return $this
*/
public function from($address | {
"filepath": "src/Illuminate/Mail/Message.php",
"language": "php",
"file_size": 11716,
"cut_index": 921,
"middle_length": 229
} |
upport\Collection;
use Illuminate\Support\Traits\ForwardsCalls;
use Symfony\Component\Mailer\SentMessage as SymfonySentMessage;
/**
* @mixin \Symfony\Component\Mailer\SentMessage
*/
class SentMessage
{
use ForwardsCalls;
/**
* The Symfony SentMessage instance.
*
* @var \Symfony\Component\Mail... | e
*/
public function getSymfonySentMessage()
{
return $this->sentMessage;
}
/**
* Dynamically pass missing methods to the Symfony instance.
*
* @param string $method
* @param array $parameters
* @r | ic function __construct(SymfonySentMessage $sentMessage)
{
$this->sentMessage = $sentMessage;
}
/**
* Get the underlying Symfony Email instance.
*
* @return \Symfony\Component\Mailer\SentMessag | {
"filepath": "src/Illuminate/Mail/SentMessage.php",
"language": "php",
"file_size": 2044,
"cut_index": 563,
"middle_length": 229
} |
ml PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<title>{{ config('app.name') }}</title>
<meta name="viewport" content="width=device-width, initial-scale... | head>
<body>
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<table class="content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
{!! $header ?? '' !!}
<!-- Email Body | nly screen and (max-width: 600px) {
.inner-body {
width: 100% !important;
}
.footer {
width: 100% !important;
}
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
}
}
</style>
{!! $head ?? '' !!}
</ | {
"filepath": "src/Illuminate/Mail/resources/views/html/layout.blade.php",
"language": "php",
"file_size": 1448,
"cut_index": 524,
"middle_length": 229
} |
<?php
namespace Illuminate\Container\Attributes;
use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use Illuminate\Log\Context\Repository;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Context implements ContextualAttribute
{
/**
* Create a... | {
$repository = $container->make(Repository::class);
return match ($attribute->hidden) {
true => $repository->getHidden($attribute->key, $attribute->default),
false => $repository->get($attribute->key, $attribute->d | value.
*
* @param self $attribute
* @param \Illuminate\Contracts\Container\Container $container
* @return mixed
*/
public static function resolve(self $attribute, Container $container): mixed
| {
"filepath": "src/Illuminate/Container/Attributes/Context.php",
"language": "php",
"file_size": 1025,
"cut_index": 512,
"middle_length": 229
} |
?php
namespace Illuminate\Container\Attributes;
use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use UnitEnum;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Storage implements ContextualAttribute
{
/**
* Create a new class instance.
... | \Container\Container $container
* @return \Illuminate\Contracts\Filesystem\Filesystem
*/
public static function resolve(self $attribute, Container $container)
{
return $container->make('filesystem')->disk($attribute->disk);
} | nate\Contracts | {
"filepath": "src/Illuminate/Container/Attributes/Storage.php",
"language": "php",
"file_size": 786,
"cut_index": 513,
"middle_length": 14
} |
te\Mail;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
class MailServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->r... | make('mail.manager')->mailer();
});
}
/**
* Register the Markdown renderer instance.
*
* @return void
*/
protected function registerMarkdownRenderer()
{
if ($this->app->runningInConsole()) {
| egisterIlluminateMailer()
{
$this->app->singleton('mail.manager', function ($app) {
return new MailManager($app);
});
$this->app->bind('mailer', function ($app) {
return $app-> | {
"filepath": "src/Illuminate/Mail/MailServiceProvider.php",
"language": "php",
"file_size": 1843,
"cut_index": 537,
"middle_length": 229
} |
uminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Translation\HasLocalePreference;
use Illuminate\Support\Traits\Conditionable;
class PendingMail
{
use Conditionable;
/**
* The mailer instance.
*
* @var \Illuminate\Contracts\Mail\Mailer
*/
protected $mailer;
... | [];
/**
* Create a new mailable mailer instance.
*
* @param \Illuminate\Contracts\Mail\Mailer $mailer
*/
public function __construct(MailerContract $mailer)
{
$this->mailer = $mailer;
}
/**
* Set th | ted $to = [];
/**
* The "cc" recipients of the message.
*
* @var array
*/
protected $cc = [];
/**
* The "bcc" recipients of the message.
*
* @var array
*/
protected $bcc = | {
"filepath": "src/Illuminate/Mail/PendingMail.php",
"language": "php",
"file_size": 3852,
"cut_index": 614,
"middle_length": 229
} |
pace Illuminate\Mail;
use Illuminate\Support\Traits\ForwardsCalls;
/**
* @mixin \Illuminate\Mail\Message
*/
class TextMessage
{
use ForwardsCalls;
/**
* The underlying message instance.
*
* @var \Illuminate\Mail\Message
*/
protected $message;
/**
* Create a new text messag... | }
/**
* Embed in-memory data in the message and get the CID.
*
* @param string|resource $data
* @param string $name
* @param string|null $contentType
* @return string
*/
public function embedData($data, $na | le in the message and get the CID.
*
* @param string|\Illuminate\Contracts\Mail\Attachable|\Illuminate\Mail\Attachment $file
* @return string
*/
public function embed($file)
{
return '';
| {
"filepath": "src/Illuminate/Mail/TextMessage.php",
"language": "php",
"file_size": 1398,
"cut_index": 524,
"middle_length": 229
} |
\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\Extension\Table\TableExtension;
use League\CommonMark\MarkdownConverter;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
class Markdown
{
/**
* The view factory implementation.
... | ool
*/
protected static $withSecuredEncoding = false;
/**
* The registered CommonMark extensions.
*
* @var array<int, class-string<\League\CommonMark\Extension\ExtensionInterface>>
*/
protected static $extensions = []; | otected $theme = 'default';
/**
* The registered component paths.
*
* @var array
*/
protected $componentPaths = [];
/**
* Indicates if secure encoding should be enabled.
*
* @var b | {
"filepath": "src/Illuminate/Mail/Markdown.php",
"language": "php",
"file_size": 7987,
"cut_index": 716,
"middle_length": 229
} |
pace Illuminate\Mail\Transport;
use Illuminate\Support\Collection;
use Stringable;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\TransportInterface;
use Symfony\Component\Mime\RawMessage;
class ArrayTransport implements Stringable, TransportInt... | {
return $this->messages[] = new SentMessage($message, $envelope ?? Envelope::create($message));
}
/**
* Retrieve the collection of messages.
*
* @return \Illuminate\Support\Collection
*/
public function messages | ance.
*/
public function __construct()
{
$this->messages = new Collection;
}
/**
* {@inheritdoc}
*/
public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage
| {
"filepath": "src/Illuminate/Mail/Transport/ArrayTransport.php",
"language": "php",
"file_size": 1455,
"cut_index": 524,
"middle_length": 229
} |
luminate\Support\Str;
use Psr\Log\LoggerInterface;
use Stringable;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\TransportInterface;
use Symfony\Component\Mime\RawMessage;
class LogTransport implements Stringable, TransportInterface
{
/**
... | pe = null): ?SentMessage
{
$string = Str::of($message->toString());
if ($string->contains('Content-Type: multipart/')) {
$boundary = $string
->after('boundary=')
->before("\r\n")
| nterface $logger
*/
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* {@inheritdoc}
*/
public function send(RawMessage $message, ?Envelope $envelo | {
"filepath": "src/Illuminate/Mail/Transport/LogTransport.php",
"language": "php",
"file_size": 2446,
"cut_index": 563,
"middle_length": 229
} |
Exception\TransportException;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\MessageConverter;
/*
MIT License
Copyright (c) 2023 Jayan Ratna
Permission is hereby grant... | yright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTAB | on the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above cop | {
"filepath": "src/Illuminate/Mail/Transport/ResendTransport.php",
"language": "php",
"file_size": 5362,
"cut_index": 716,
"middle_length": 229
} |
;
use Illuminate\Support\Collection;
use Stringable;
use Symfony\Component\Mailer\Exception\TransportException;
use Symfony\Component\Mailer\Header\MetadataHeader;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mime\Message;
class SesV2Transpor... | */
public function __construct(SesV2Client $ses, $options = [])
{
$this->ses = $ses;
$this->options = $options;
parent::__construct();
}
/**
* {@inheritDoc}
*
* @throws \Symfony\Component\Mailer\Ex | SES transmission options.
*
* @var array
*/
protected $options = [];
/**
* Create a new SES V2 transport instance.
*
* @param \Aws\SesV2\SesV2Client $ses
* @param array $options
| {
"filepath": "src/Illuminate/Mail/Transport/SesV2Transport.php",
"language": "php",
"file_size": 4653,
"cut_index": 614,
"middle_length": 229
} |
luminate\Support\Collection;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Conditionable;
class Headers
{
use Conditionable;
/**
* The message's message ID.
*
* @var string|null
*/
public $messageId;
/**
* The message IDs that are referenced by the message.
*... | ull, array $references = [], array $text = [])
{
$this->messageId = $messageId;
$this->references = $references;
$this->text = $text;
}
/**
* Set the message ID.
*
* @param string $messageId
* @ret | rs for a message.
*
* @param string|null $messageId
* @param array $references
* @param array $text
*
* @named-arguments-supported
*/
public function __construct(?string $messageId = n | {
"filepath": "src/Illuminate/Mail/Mailables/Headers.php",
"language": "php",
"file_size": 2047,
"cut_index": 563,
"middle_length": 229
} |
e Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper;
use Symfony\Component\Routing\RouteCollection as SymfonyRouteCollection;
use Traversable;
abstract class Abstr... | $request, $route)
{
if (! is_null($route)) {
return $route->bind($request);
}
// If no route was found we will now check if a matching route is specified by
// another HTTP verb. If it is we will need to th | @param \Illuminate\Routing\Route|null $route
* @return \Illuminate\Routing\Route
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
protected function handleMatchedRoute(Request | {
"filepath": "src/Illuminate/Routing/AbstractRouteCollection.php",
"language": "php",
"file_size": 8861,
"cut_index": 716,
"middle_length": 229
} |
n;
use Symfony\Component\Routing\Matcher\CompiledUrlMatcher;
use Symfony\Component\Routing\RequestContext;
class CompiledRouteCollection extends AbstractRouteCollection
{
/**
* The compiled routes collection.
*
* @var array
*/
protected $compiled = [];
/**
* An array of the route ... | /**
* The container instance used by the route.
*
* @var \Illuminate\Container\Container
*/
protected $container;
/**
* A cache of resolved Route instances keyed by route name.
*
* @var array<string, \Illuminat | s.
*
* @var \Illuminate\Routing\RouteCollection|null
*/
protected $routes;
/**
* The router instance used by the route.
*
* @var \Illuminate\Routing\Router
*/
protected $router;
| {
"filepath": "src/Illuminate/Routing/CompiledRouteCollection.php",
"language": "php",
"file_size": 9311,
"cut_index": 921,
"middle_length": 229
} |
te\Routing;
use BadMethodCallException;
abstract class Controller
{
/**
* The middleware registered on the controller.
*
* @var array
*/
protected $middleware = [];
/**
* Register middleware on the controller.
*
* @param \Closure|array|string $middleware
* @param... | * Get the middleware assigned to the controller.
*
* @return array
*/
public function getMiddleware()
{
return $this->middleware;
}
/**
* Execute an action on the controller.
*
* @param string $meth | ware as $m) {
$this->middleware[] = [
'middleware' => $m,
'options' => &$options,
];
}
return new ControllerMiddlewareOptions($options);
}
/**
| {
"filepath": "src/Illuminate/Routing/Controller.php",
"language": "php",
"file_size": 1684,
"cut_index": 537,
"middle_length": 229
} |
e\Container\Container;
use Illuminate\Routing\Contracts\ControllerDispatcher as ControllerDispatcherContract;
use Illuminate\Support\Collection;
class ControllerDispatcher implements ControllerDispatcherContract
{
use FiltersControllerMiddleware, ResolvesRouteDependencies;
/**
* The container instance.
... | inate\Routing\Route $route
* @param mixed $controller
* @param string $method
* @return mixed
*/
public function dispatch(Route $route, $controller, $method)
{
$parameters = $this->resolveParameters($route, $control | tainer $container
*/
public function __construct(Container $container)
{
$this->container = $container;
}
/**
* Dispatch a request to a given controller and method.
*
* @param \Illum | {
"filepath": "src/Illuminate/Routing/ControllerDispatcher.php",
"language": "php",
"file_size": 2269,
"cut_index": 563,
"middle_length": 229
} |
abase\Eloquent\ModelNotFoundException;
use Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException;
use Illuminate\Support\Reflector;
use Illuminate\Support\Str;
class ImplicitRouteBinding
{
/**
* Resolve the implicit route bindings for the given route.
*
* @param \Illuminate\Container\Contai... | :resolveBackedEnumsForRoute($route, $parameters);
foreach ($route->signatureParameters(['subClass' => UrlRoutable::class]) as $parameter) {
if (! $parameterName = static::getParameterName($parameter->getName(), $parameters)) {
| del>
* @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
*/
public static function resolveForRoute($container, $route)
{
$parameters = $route->parameters();
$route = static: | {
"filepath": "src/Illuminate/Routing/ImplicitRouteBinding.php",
"language": "php",
"file_size": 4424,
"cut_index": 614,
"middle_length": 229
} |
as MailFactory;
use Illuminate\Contracts\Mail\Mailable as MailableContract;
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
use Illuminate\Contracts\Queue\ShouldQueueAfterCommit;
use Illuminate\Queue\Attributes\Backoff;
use Illuminate\Queue\Attributes\Connection;
use Illuminate\Queue\Attributes\MaxExceptions;
use Il... | */
public $mailable;
/**
* The number of times the job may be attempted.
*
* @var int
*/
public $tries;
/**
* The number of seconds the job can run before timing out.
*
* @var int
*/
public $ti | uminate\Queue\InteractsWithQueue;
class SendQueuedMailable
{
use InteractsWithQueue, Queueable, ReadsQueueAttributes;
/**
* The mailable message instance.
*
* @var \Illuminate\Contracts\Mail\Mailable
| {
"filepath": "src/Illuminate/Mail/SendQueuedMailable.php",
"language": "php",
"file_size": 4035,
"cut_index": 614,
"middle_length": 229
} |
e Illuminate\Support\Collection;
use Stringable;
use Symfony\Component\Mailer\Exception\TransportException;
use Symfony\Component\Mailer\Header\MetadataHeader;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mime\Message;
class SesTransport exte... | tion __construct(SesClient $ses, $options = [])
{
$this->ses = $ses;
$this->options = $options;
parent::__construct();
}
/**
* {@inheritDoc}
*
* @throws \Symfony\Component\Mailer\Exception\TransportExcep | ion options.
*
* @var array
*/
protected $options = [];
/**
* Create a new SES transport instance.
*
* @param \Aws\Ses\SesClient $ses
* @param array $options
*/
public func | {
"filepath": "src/Illuminate/Mail/Transport/SesTransport.php",
"language": "php",
"file_size": 4454,
"cut_index": 614,
"middle_length": 229
} |
@var array
*/
public $to;
/**
* The recipients receiving a copy of the message.
*
* @var array
*/
public $cc;
/**
* The recipients receiving a blind copy of the message.
*
* @var array
*/
public $bcc;
/**
* The recipients that should be replie... | acks.
*
* @var array
*/
public $using = [];
/**
* Create a new message envelope instance.
*
* @param \Illuminate\Mail\Mailables\Address|string|null $from
* @param array<int, \Illuminate\Mail\Mailables\Address| | s tags.
*
* @var array
*/
public $tags = [];
/**
* The message's metadata.
*
* @var array
*/
public $metadata = [];
/**
* The message's Symfony Message customization callb | {
"filepath": "src/Illuminate/Mail/Mailables/Envelope.php",
"language": "php",
"file_size": 9569,
"cut_index": 921,
"middle_length": 229
} |
pace Illuminate\Routing;
use Illuminate\Container\Container;
use Illuminate\Routing\Contracts\CallableDispatcher as CallableDispatcherContract;
use ReflectionFunction;
class CallableDispatcher implements CallableDispatcherContract
{
use ResolvesRouteDependencies;
/**
* The container instance.
*
... | ute
* @param callable $callable
* @return mixed
*/
public function dispatch(Route $route, $callable)
{
return $callable(...array_values($this->resolveParameters($route, $callable)));
}
/**
* Resolve the parame | ntainer
*/
public function __construct(Container $container)
{
$this->container = $container;
}
/**
* Dispatch a request to a given callable.
*
* @param \Illuminate\Routing\Route $ro | {
"filepath": "src/Illuminate/Routing/CallableDispatcher.php",
"language": "php",
"file_size": 1350,
"cut_index": 524,
"middle_length": 229
} |
s
{
/**
* The middleware options.
*
* @var array
*/
protected $options;
/**
* Create a new middleware option instance.
*
* @param array $options
*/
public function __construct(array &$options)
{
$this->options = &$options;
}
/**
* Set ... |
return $this;
}
/**
* Set the controller methods the middleware should exclude.
*
* @param mixed $methods
* @return $this
*/
public function except($methods)
{
$this->options['except'] = is_arra | ] = is_array($methods) ? $methods : func_get_args(); | {
"filepath": "src/Illuminate/Routing/ControllerMiddlewareOptions.php",
"language": "php",
"file_size": 963,
"cut_index": 582,
"middle_length": 52
} |
s;
use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
#[Attribute(Attribute::TARGET_PARAMETER)]
class Give implements ContextualAttribute
{
/**
* Provide a concrete class implementation for dependency injection.
*
* @param string $... | * @param \Illuminate\Contracts\Container\Container $container
* @return mixed
*/
public static function resolve(self $attribute, Container $container): mixed
{
return $container->make($attribute->class, $attribute->params);
| endency.
*
* @param self $attribute
| {
"filepath": "src/Illuminate/Container/Attributes/Give.php",
"language": "php",
"file_size": 872,
"cut_index": 559,
"middle_length": 52
} |
te\Mail\Events;
use Exception;
use Illuminate\Mail\SentMessage;
use Illuminate\Support\Collection;
/**
* @property \Symfony\Component\Mime\Email $message
*/
class MessageSent
{
/**
* Create a new event instance.
*
* @param \Illuminate\Mail\SentMessage $sent The message that was sent.
* @p... | 'sent' => $this->sent,
'data' => $hasAttachments ? base64_encode(serialize($this->data)) : $this->data,
'hasAttachments' => $hasAttachments,
];
}
/**
* Marshal the object from its serialized data.
*
| able representation of the object.
*
* @return array
*/
public function __serialize()
{
$hasAttachments = (new Collection($this->message->getAttachments()))->isNotEmpty();
return [
| {
"filepath": "src/Illuminate/Mail/Events/MessageSent.php",
"language": "php",
"file_size": 1714,
"cut_index": 537,
"middle_length": 229
} |
e\Support\Collection;
use function Illuminate\Support\enum_value;
trait CreatesRegularExpressionRouteConstraints
{
/**
* Specify that the given route parameters must be alphabetic.
*
* @param array|string $parameters
* @return $this
*/
public function whereAlpha($parameters)
{
... | route parameters must be numeric.
*
* @param array|string $parameters
* @return $this
*/
public function whereNumber($parameters)
{
return $this->assignExpressionToParameters($parameters, '[0-9]+');
}
/**
| ing $parameters
* @return $this
*/
public function whereAlphaNumeric($parameters)
{
return $this->assignExpressionToParameters($parameters, '[a-zA-Z0-9]+');
}
/**
* Specify that the given | {
"filepath": "src/Illuminate/Routing/CreatesRegularExpressionRouteConstraints.php",
"language": "php",
"file_size": 2601,
"cut_index": 563,
"middle_length": 229
} |
namespace Illuminate\Routing\Controllers;
use Closure;
use Illuminate\Support\Arr;
/**
* @phpstan-type NextClosure \Closure(\Illuminate\Http\Request): \Symfony\Component\HttpFoundation\Response
*/
class Middleware
{
/**
* Create a new controller middleware definition.
*
* @param (\Closure(\Illu... | o.
*
* @param array|string $only
* @return $this
*/
public function only(array|string $only)
{
$this->only = Arr::wrap($only);
return $this;
}
/**
* Specify the controller methods the middleware | */
public function __construct(public Closure|string|array $middleware, public ?array $only = null, public ?array $except = null)
{
}
/**
* Specify the only controller methods the middleware should apply t | {
"filepath": "src/Illuminate/Routing/Controllers/Middleware.php",
"language": "php",
"file_size": 1227,
"cut_index": 518,
"middle_length": 229
} |
e Illuminate\Support\Str;
use LogicException;
use UnexpectedValueException;
class RouteAction
{
/**
* Parse the given action into an array.
*
* @param string $uri
* @param mixed $action
* @return array
*/
public static function parse($uri, $action)
{
// If no actio... | "uses" property, because there is nothing else we need to do when
// it is available. Otherwise we will need to find it in the action list.
if (Reflector::isCallable($action, true)) {
return ! is_array($action) ? ['uses' => $act | action to handle the given uri.
if (is_null($action)) {
return static::missingAction($uri);
}
// If the action is already a Closure instance, we will just set that instance
// as the | {
"filepath": "src/Illuminate/Routing/RouteAction.php",
"language": "php",
"file_size": 3464,
"cut_index": 614,
"middle_length": 229
} |
/**
* The resource registrar.
*
* @var \Illuminate\Routing\ResourceRegistrar
*/
protected $registrar;
/**
* The resource name.
*
* @var string
*/
protected $name;
/**
* The resource controller.
*
* @var string
*/
protected $controll... | roller
* @param array $options
*/
public function __construct(ResourceRegistrar $registrar, $name, $controller, array $options)
{
$this->name = $name;
$this->options = $options;
$this->registrar = $registrar;
| protected $registered = false;
/**
* Create a new pending resource registration instance.
*
* @param \Illuminate\Routing\ResourceRegistrar $registrar
* @param string $name
* @param string $cont | {
"filepath": "src/Illuminate/Routing/PendingResourceRegistration.php",
"language": "php",
"file_size": 7686,
"cut_index": 716,
"middle_length": 229
} |
te\Routing;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Support\Responsable;
use Illuminate\Http\Request;
use Illuminate\Pipeline\Pipeline as BasePipeline;
use Throwable;
/**
* This extended pipeline catches any exceptions that occur during each slice.
*
* The exceptions are converted... | : $carry;
}
/**
* Handle the given exception.
*
* @param mixed $passable
* @param \Throwable $e
* @return mixed
*
* @throws \Throwable
*/
protected function handleException($passable, Throwa | * @param mixed $carry
* @return mixed
*/
protected function handleCarry($carry)
{
return $carry instanceof Responsable
? $carry->toResponse($this->getContainer()->make(Request::class))
| {
"filepath": "src/Illuminate/Routing/Pipeline.php",
"language": "php",
"file_size": 1523,
"cut_index": 537,
"middle_length": 229
} |
/**
* The URL generator instance.
*
* @var \Illuminate\Routing\UrlGenerator
*/
protected $generator;
/**
* The session store instance.
*
* @var \Illuminate\Session\Store
*/
protected $session;
/**
* Create a new Redirector instance.
*
* @param ... | s = 302, $headers = [], $fallback = false)
{
return $this->createRedirect($this->generator->previous($fallback), $status, $headers);
}
/**
* Create a new redirect response to the current URI.
*
* @param int $status
| edirect response to the previous location.
*
* @param int $status
* @param array $headers
* @param mixed $fallback
* @return \Illuminate\Http\RedirectResponse
*/
public function back($statu | {
"filepath": "src/Illuminate/Routing/Redirector.php",
"language": "php",
"file_size": 7345,
"cut_index": 716,
"middle_length": 229
} |
lluminate\Support\Reflector;
use ReflectionClass;
use ReflectionFunctionAbstract;
use ReflectionMethod;
use ReflectionParameter;
use stdClass;
trait ResolvesRouteDependencies
{
/**
* Resolve the object method's type-hinted dependencies.
*
* @param array $parameters
* @param object $instance... | ethod's type-hinted dependencies.
*
* @param array $parameters
* @param \ReflectionFunctionAbstract $reflector
* @return array
*/
public function resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $refl | tance, $method)) {
return $parameters;
}
return $this->resolveMethodDependencies(
$parameters, new ReflectionMethod($instance, $method)
);
}
/**
* Resolve the given m | {
"filepath": "src/Illuminate/Routing/ResolvesRouteDependencies.php",
"language": "php",
"file_size": 3902,
"cut_index": 614,
"middle_length": 229
} |
oute is a fallback route.
*
* @var bool
*/
public $isFallback = false;
/**
* The controller instance.
*
* @var mixed
*/
public $controller;
/**
* The default values for the route.
*
* @var array
*/
public $defaults = [];
/**
* The re... | protected $originalParameters;
/**
* Indicates "trashed" models can be retrieved when resolving implicit model bindings for this route.
*
* @var bool
*/
protected $withTrashedBindings = false;
/**
* Indicates the m | meters;
/**
* The parameter names for the route.
*
* @var array|null
*/
public $parameterNames;
/**
* The array of the matched parameters' original values.
*
* @var array
*/
| {
"filepath": "src/Illuminate/Routing/Route.php",
"language": "php",
"file_size": 35299,
"cut_index": 2151,
"middle_length": 229
} |
namespace Illuminate\Routing;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class RedirectController extends Controller
{
/**
* Invoke the controller method.
*
* @param \Illuminate\Http\Request $request
* @p... | $route = (new Route('GET', $destination, [
'as' => 'laravel_route_redirect_destination',
]))->bind($request);
$parameters = $parameters->only(
$route->getCompiled()->getPathVariables()
)->all();
$ur | s = new Collection($request->route()->parameters());
$status = $parameters->get('status');
$destination = $parameters->get('destination');
$parameters->forget('status')->forget('destination');
| {
"filepath": "src/Illuminate/Routing/RedirectController.php",
"language": "php",
"file_size": 1246,
"cut_index": 518,
"middle_length": 229
} |
$parameterMap = [];
/**
* Singular global parameters.
*
* @var bool
*/
protected static $singularParameters = true;
/**
* The verbs used in the resource URIs.
*
* @var array
*/
protected static $verbs = [
'create' => 'create',
'edit' => 'edit',
... | tion
*/
public function register($name, $controller, array $options = [])
{
if (isset($options['parameters']) && ! isset($this->parameters)) {
$this->parameters = $options['parameters'];
}
// If the resourc | $this->router = $router;
}
/**
* Route a resource to a controller.
*
* @param string $name
* @param string $controller
* @param array $options
* @return \Illuminate\Routing\RouteCollec | {
"filepath": "src/Illuminate/Routing/ResourceRegistrar.php",
"language": "php",
"file_size": 22223,
"cut_index": 1331,
"middle_length": 229
} |
nt
{
use Conditionable;
/**
* The Blade view that should be rendered for the mailable.
*
* @var string|null
*/
public $view;
/**
* The Blade view that should be rendered for the mailable.
*
* Alternative syntax for "view".
*
* @var string|null
*/
p... | * The message's view data.
*
* @var array
*/
public $with;
/**
* Create a new content definition.
*
* @param string|null $view
* @param string|null $html
* @param string|null $text
* @param | ents the Markdown version of the message.
*
* @var string|null
*/
public $markdown;
/**
* The pre-rendered HTML of the message.
*
* @var string|null
*/
public $htmlString;
/**
| {
"filepath": "src/Illuminate/Mail/Mailables/Content.php",
"language": "php",
"file_size": 3107,
"cut_index": 614,
"middle_length": 229
} |
ts\Container;
interface ContextualBindingBuilder
{
/**
* Define the abstract target that depends on the context.
*
* @param string $abstract
* @return $this
*/
public function needs($abstract);
/**
* Define the implementation for the contextual binding.
*
* @param... | tag
* @return $this
*/
public function giveTagged($tag);
/**
* Specify the configuration item to bind as a primitive.
*
* @param string $key
* @param mixed $default
* @return $this
*/
public function | contextual binding.
*
* @param string $ | {
"filepath": "src/Illuminate/Contracts/Container/ContextualBindingBuilder.php",
"language": "php",
"file_size": 893,
"cut_index": 547,
"middle_length": 52
} |
acroable;
/**
* The resource registrar.
*
* @var \Illuminate\Routing\ResourceRegistrar
*/
protected $registrar;
/**
* The resource name.
*
* @var string
*/
protected $name;
/**
* The resource controller.
*
* @var string
*/
protected ... | aram string $controller
* @param array $options
*/
public function __construct(ResourceRegistrar $registrar, $name, $controller, array $options)
{
$this->name = $name;
$this->options = $options;
$this->registra | */
protected $registered = false;
/**
* Create a new pending singleton resource registration instance.
*
* @param \Illuminate\Routing\ResourceRegistrar $registrar
* @param string $name
* @p | {
"filepath": "src/Illuminate/Routing/PendingSingletonResourceRegistration.php",
"language": "php",
"file_size": 6942,
"cut_index": 716,
"middle_length": 229
} |
rt\Traits\Macroable;
use ReflectionFunction;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedJsonResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Throwable;
class ResponseFactory implements FactoryContract
{
use Macroable;
/**
* Th... | public function __construct(ViewFactory $view, Redirector $redirector)
{
$this->view = $view;
$this->redirector = $redirector;
}
/**
* Create a new response instance.
*
* @param mixed $content
* @param | rector
*/
protected $redirector;
/**
* Create a new response factory instance.
*
* @param \Illuminate\Contracts\View\Factory $view
* @param \Illuminate\Routing\Redirector $redirector
*/
| {
"filepath": "src/Illuminate/Routing/ResponseFactory.php",
"language": "php",
"file_size": 11679,
"cut_index": 921,
"middle_length": 229
} |
e\Http\Request;
interface RouteCollectionInterface
{
/**
* Add a Route instance to the collection.
*
* @param \Illuminate\Routing\Route $route
* @return \Illuminate\Routing\Route
*/
public function add(Route $route);
/**
* Refresh the name look-up table.
*
* This ... | request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Routing\Route
*
* @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
* @throws \Symfony\Component\HttpKernel\Exception\N | k-up table.
*
* This is done in case any actions are overwritten with new controllers.
*
* @return void
*/
public function refreshActionLookups();
/**
* Find the first route matching a given | {
"filepath": "src/Illuminate/Routing/RouteCollectionInterface.php",
"language": "php",
"file_size": 2332,
"cut_index": 563,
"middle_length": 229
} |
*
* The route instance.
*
* @var \Illuminate\Routing\Route
*/
protected $route;
/**
* Create a new Route parameter binder instance.
*
* @param \Illuminate\Routing\Route $route
*/
public function __construct($route)
{
$this->route = $route;
}
/*... | ge them into this parameters array so that this array is completed.
if (! is_null($this->route->compiled->getHostRegex())) {
$parameters = $this->bindHostParameters(
$request, $parameters
);
}
| ers = $this->bindPathParameters($request);
// If the route has a regular expression for the host part of the URI, we will
// compile that and get the parameter matches for this domain. We will then
// mer | {
"filepath": "src/Illuminate/Routing/RouteParameterBinder.php",
"language": "php",
"file_size": 3093,
"cut_index": 614,
"middle_length": 229
} |
te\Routing;
use Illuminate\Support\Reflector;
use Illuminate\Support\Str;
use ReflectionFunction;
use ReflectionMethod;
class RouteSignatureParameters
{
/**
* Extract the route action's signature parameters.
*
* @param array $action
* @param array $conditions
* @return array
*/
... | (true) {
! empty($conditions['subClass']) => array_filter($parameters, fn ($p) => Reflector::isParameterSubclassOf($p, $conditions['subClass'])),
! empty($conditions['backedEnum']) => array_filter($parameters, fn ($p) => Reflector:: | losure()
: $action['uses'];
$parameters = is_string($callback)
? static::fromClassMethodString($callback)
: (new ReflectionFunction($callback))->getParameters();
return match | {
"filepath": "src/Illuminate/Routing/RouteSignatureParameters.php",
"language": "php",
"file_size": 1590,
"cut_index": 537,
"middle_length": 229
} |
*
* @var \Illuminate\Http\Request
*/
protected $request;
/**
* The named parameter defaults.
*
* @var array
*/
public $defaultParameters = [];
/**
* Characters that should not be URL encoded.
*
* @var array
*/
public $dontEncode = [
'%... | * @param \Illuminate\Http\Request $request
*/
public function __construct($url, $request)
{
$this->url = $url;
$this->request = $request;
}
/**
* Generate a URL for the given route.
*
* @param \Illumi | '%7C' => '|',
'%3F' => '?',
'%26' => '&',
'%23' => '#',
'%25' => '%',
];
/**
* Create a new Route URL generator.
*
* @param \Illuminate\Routing\UrlGenerator $url
| {
"filepath": "src/Illuminate/Routing/RouteUrlGenerator.php",
"language": "php",
"file_size": 14962,
"cut_index": 921,
"middle_length": 229
} |
outing\UrlGenerator as UrlGeneratorContract;
use Illuminate\Contracts\View\Factory as ViewFactoryContract;
use Illuminate\Routing\Contracts\CallableDispatcher as CallableDispatcherContract;
use Illuminate\Routing\Contracts\ControllerDispatcher as ControllerDispatcherContract;
use Illuminate\Support\ServiceProvider;
use... | enerator();
$this->registerRedirector();
$this->registerPsrRequest();
$this->registerPsrResponse();
$this->registerResponseFactory();
$this->registerCallableDispatcher();
$this->registerControllerDispatcher() | s RoutingServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerRouter();
$this->registerUrlG | {
"filepath": "src/Illuminate/Routing/RoutingServiceProvider.php",
"language": "php",
"file_size": 6848,
"cut_index": 716,
"middle_length": 229
} |
*/
protected $request;
/**
* The asset root URL.
*
* @var string
*/
protected $assetRoot;
/**
* The forced URL root.
*
* @var string
*/
protected $forcedRoot;
/**
* The forced scheme for URLs.
*
* @var string
*/
protected $f... | ace;
/**
* The session resolver callable.
*
* @var callable
*/
protected $sessionResolver;
/**
* The encryption key resolver callable.
*
* @var callable
*/
protected $keyResolver;
/**
* Th | heme for the current request.
*
* @var string|null
*/
protected $cachedScheme;
/**
* The root namespace being applied to controller actions.
*
* @var string
*/
protected $rootNamesp | {
"filepath": "src/Illuminate/Routing/UrlGenerator.php",
"language": "php",
"file_size": 24862,
"cut_index": 1331,
"middle_length": 229
} |
firm;
use function Laravel\Prompts\select;
use function Laravel\Prompts\suggest;
#[AsCommand(name: 'make:controller')]
class ControllerMakeCommand extends GeneratorCommand
{
use CreatesMatchingTest;
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:controller';... | if ($type = $this->option('type')) {
$stub = "/stubs/controller.{$type}.stub";
} elseif ($this->option('parent')) {
$stub = $this->option('singleton')
? '/stubs/controller.nested.singleton.stub'
| ted.
*
* @var string
*/
protected $type = 'Controller';
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
$stub = null;
| {
"filepath": "src/Illuminate/Routing/Console/ControllerMakeCommand.php",
"language": "php",
"file_size": 11517,
"cut_index": 921,
"middle_length": 229
} |
pace Illuminate\Routing\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Registrar;
use Illuminate\Database\Eloquent\ModelNotFoundException;
class SubstituteBindings
{
/**
* The router instance.
*
* @var \Illuminate\Contracts\Routing\Registrar
*/
protected $router;
/**
*... | NotFoundException
*/
public function handle($request, Closure $next)
{
$route = $request->route();
try {
$this->router->substituteBindings($route);
$this->router->substituteImplicitBindings($route);
| r = $router;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*
* @throws \Illuminate\Database\Eloquent\Model | {
"filepath": "src/Illuminate/Routing/Middleware/SubstituteBindings.php",
"language": "php",
"file_size": 1263,
"cut_index": 524,
"middle_length": 229
} |
luminate\Contracts\Redis\Factory as Redis;
use Illuminate\Redis\Limiters\DurationLimiter;
class ThrottleRequestsWithRedis extends ThrottleRequests
{
/**
* The Redis factory implementation.
*
* @var \Illuminate\Contracts\Redis\Factory
*/
protected $redis;
/**
* The timestamp of the... | RateLimiter $limiter, Redis $redis)
{
parent::__construct($limiter);
$this->redis = $redis;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
| ic $remaining = [];
/**
* Create a new request throttler.
*
* @param \Illuminate\Cache\RateLimiter $limiter
* @param \Illuminate\Contracts\Redis\Factory $redis
*/
public function __construct( | {
"filepath": "src/Illuminate/Routing/Middleware/ThrottleRequestsWithRedis.php",
"language": "php",
"file_size": 4330,
"cut_index": 614,
"middle_length": 229
} |
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Str;
class RouteBinding
{
/**
* Create a Route model binding for a given callback.
*
* @param \Illuminate\Container\Container $container
* @param \Closure|string $binder
* @return \Closure
*/
publi... | function createClassBinding($container, $binding)
{
return function ($value, $route) use ($container, $binding) {
// If the binding has an @ sign, we will assume it's being used to delimit
// the class name from the bind | ;
}
/**
* Create a class based binding using the IoC container.
*
* @param \Illuminate\Container\Container $container
* @param string $binding
* @return \Closure
*/
protected static | {
"filepath": "src/Illuminate/Routing/RouteBinding.php",
"language": "php",
"file_size": 2998,
"cut_index": 563,
"middle_length": 229
} |
e\Support\Arr;
class RouteGroup
{
/**
* Merge route groups into a new array.
*
* @param array $new
* @param array $old
* @param bool $prependExistingPrefix
* @return array
*/
public static function merge($new, $old, $prependExistingPrefix = true)
{
if (isset... | ]);
return array_merge_recursive(Arr::except(
$old, ['namespace', 'prefix', 'where', 'as']
), $new);
}
/**
* Format the namespace for the new group attributes.
*
* @param array $new
* @param | formatAs($new, $old), [
'namespace' => static::formatNamespace($new, $old),
'prefix' => static::formatPrefix($new, $old, $prependExistingPrefix),
'where' => static::formatWhere($new, $old),
| {
"filepath": "src/Illuminate/Routing/RouteGroup.php",
"language": "php",
"file_size": 2730,
"cut_index": 563,
"middle_length": 229
} |
null $action = null)
* @method \Illuminate\Routing\Route get(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route options(string $uri, \Closure|array|string|null $action = null)
* @method \Illuminate\Routing\Route patch(string $uri, \Closure|array|string|null $action = null)
*... | ring $controller)
* @method \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value)
* @method \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
* @method \Illuminate\Routing\RouteRegistrar missing(\Closure $missin |
* @method \Illuminate\Routing\RouteRegistrar as(string $value)
* @method \Illuminate\Routing\RouteRegistrar can(\UnitEnum|string $ability, array|string $models = [])
* @method \Illuminate\Routing\RouteRegistrar controller(st | {
"filepath": "src/Illuminate/Routing/RouteRegistrar.php",
"language": "php",
"file_size": 9469,
"cut_index": 921,
"middle_length": 229
} |
ds Collection
{
/**
* Create a new Sorted Middleware container.
*
* @param array $priorityMap
* @param \Illuminate\Support\Collection|array $middlewares
*/
public function __construct(array $priorityMap, $middlewares)
{
if ($middlewares instanceof Collection) {
... | ddleware($priorityMap, $middlewares)
{
$lastIndex = 0;
foreach ($middlewares as $index => $middleware) {
if (! is_string($middleware)) {
continue;
}
$priorityIndex = $this->priorityM | .
*
* Each call to this method makes one discrete middleware movement if necessary.
*
* @param array $priorityMap
* @param array $middlewares
* @return array
*/
protected function sortMi | {
"filepath": "src/Illuminate/Routing/SortedMiddleware.php",
"language": "php",
"file_size": 3825,
"cut_index": 614,
"middle_length": 229
} |
pace Illuminate\Routing\Console;
use Illuminate\Console\Concerns\CreatesMatchingTest;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'make:middleware')]
class MiddlewareMakeCommand extends GeneratorCommand
{
use CreatesMatchingTest;
/**
* Th... | .
*
* @return string
*/
protected function getStub()
{
return $this->resolveStubPath('/stubs/middleware.stub');
}
/**
* Resolve the fully-qualified path to the stub.
*
* @param string $stub
* @r | ted $description = 'Create a new HTTP middleware class';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Middleware';
/**
* Get the stub file for the generator | {
"filepath": "src/Illuminate/Routing/Console/MiddlewareMakeCommand.php",
"language": "php",
"file_size": 1483,
"cut_index": 524,
"middle_length": 229
} |
e Closure;
use Illuminate\Routing\Exceptions\InvalidSignatureException;
use Illuminate\Support\Arr;
class ValidateSignature
{
/**
* The names of the parameters that should be ignored.
*
* @var array<int, string>
*/
protected $ignore = [
//
];
/**
* The globally ignored... | .$ignore]);
}
/**
* Specify that the URL signature is for an absolute URL.
*
* @param array|string $ignore
* @return class-string
*/
public static function absolute($ignore = [])
{
$ignore = Arr::wrap($ig | $ignore
* @return string
*/
public static function relative($ignore = [])
{
$ignore = Arr::wrap($ignore);
return static::class.':'.implode(',', empty($ignore) ? ['relative'] : ['relative', .. | {
"filepath": "src/Illuminate/Routing/Middleware/ValidateSignature.php",
"language": "php",
"file_size": 2697,
"cut_index": 563,
"middle_length": 229
} |
by method.
*
* @var array
*/
protected $routes = [];
/**
* Domain routes keyed by method, used to maintain domain-first ordering.
*
* @var array
*/
protected $domainRoutes = [];
/**
* A flattened array of all of the routes.
*
* @var \Illuminate\Routing... | controller action.
*
* @var \Illuminate\Routing\Route[]
*/
protected $actionList = [];
/**
* Add a Route instance to the collection.
*
* @param \Illuminate\Routing\Route $route
* @return \Illuminate\Routing\Ro | */
protected $allDomainRoutes = [];
/**
* A look-up table of routes by their names.
*
* @var \Illuminate\Routing\Route[]
*/
protected $nameList = [];
/**
* A look-up table of routes by | {
"filepath": "src/Illuminate/Routing/RouteCollection.php",
"language": "php",
"file_size": 8722,
"cut_index": 716,
"middle_length": 229
} |
The route collection instance.
*
* @var \Illuminate\Routing\RouteCollectionInterface
*/
protected $routes;
/**
* The currently dispatched route instance.
*
* @var \Illuminate\Routing\Route|null
*/
protected $current;
/**
* The request currently being dispatched... | ware to always be in the given order.
*
* @var array
*/
public $middlewarePriority = [];
/**
* The registered route value binders.
*
* @var array
*/
protected $binders = [];
/**
* The globally avail | $middleware = [];
/**
* All of the middleware groups.
*
* @var array
*/
protected $middlewareGroups = [];
/**
* The priority-sorted list of middleware.
*
* Forces the listed middle | {
"filepath": "src/Illuminate/Routing/Router.php",
"language": "php",
"file_size": 41533,
"cut_index": 2151,
"middle_length": 229
} |
tion;
use Symfony\Component\HttpFoundation\Response;
use function Illuminate\Support\enum_value;
class ThrottleRequests
{
use InteractsWithTime;
/**
* The rate limiter instance.
*
* @var \Illuminate\Cache\RateLimiter
*/
protected $limiter;
/**
* Indicates if the rate limiter... | Enum|string $name
* @return string
*/
public static function using($name)
{
return static::class.':'.enum_value($name);
}
/**
* Specify the rate limiter configuration for the middleware.
*
* @param int $ | eLimiter $limiter
*/
public function __construct(RateLimiter $limiter)
{
$this->limiter = $limiter;
}
/**
* Specify the named rate limiter to use for the middleware.
*
* @param \Unit | {
"filepath": "src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"language": "php",
"file_size": 11045,
"cut_index": 921,
"middle_length": 229
} |
patcher;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Collection;
use Throwable;
class ChainedBatch implements ShouldQueue
{
use Batchable, Dispatchable, InteractsWithQueue, Queueable;
/**
* The col... | */
public function __construct(PendingBatch $batch)
{
$this->jobs = static::prepareNestedBatches($batch->jobs);
$this->name = $batch->name;
$this->options = $batch->options;
$this->queue = $batch->queue();
| lic string $name;
/**
* The batch options.
*
* @var array
*/
public array $options;
/**
* Create a new chained batch instance.
*
* @param \Illuminate\Bus\PendingBatch $batch
| {
"filepath": "src/Illuminate/Bus/ChainedBatch.php",
"language": "php",
"file_size": 3930,
"cut_index": 614,
"middle_length": 229
} |
ueue\Attributes\DebounceFor;
use Illuminate\Queue\Attributes\ReadsQueueAttributes;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class DebounceLock
{
use ReadsQueueAttributes;
/**
* The cache repository implementation.
*
* @var \Illuminate\Contracts\Cache\Repository
*/
pro... | $job
* @param int|null $debounceFor
* @param int|null $maxWait
* @return array{owner: string, maxWaitExceeded: bool}
*/
public function acquire($job, $debounceFor = null, $maxWait = null)
{
$cache = $this->resolveCac | cache)
{
$this->cache = $cache;
}
/**
* Store a debounce owner token for the given job.
*
* Overwrites any existing token, implementing last-writer-wins semantics.
*
* @param mixed | {
"filepath": "src/Illuminate/Bus/DebounceLock.php",
"language": "php",
"file_size": 4647,
"cut_index": 614,
"middle_length": 229
} |
@var \Aws\DynamoDb\DynamoDbClient
*/
protected $dynamoDbClient;
/**
* The application name.
*
* @var string
*/
protected $applicationName;
/**
* The table to use to store batch information.
*
* @var string
*/
protected $table;
/**
* The time-t... | function __construct(
BatchFactory $factory,
DynamoDbClient $dynamoDbClient,
string $applicationName,
string $table,
?int $ttl,
?string $ttlAttribute,
) {
$this->factory = $factory;
$this- | protected $ttlAttribute;
/**
* The DynamoDB marshaler instance.
*
* @var \Aws\DynamoDb\Marshaler
*/
protected $marshaler;
/**
* Create a new batch repository instance.
*/
public | {
"filepath": "src/Illuminate/Bus/DynamoBatchRepository.php",
"language": "php",
"file_size": 15302,
"cut_index": 921,
"middle_length": 229
} |
pace Illuminate\Routing;
class RouteUri
{
/**
* The route URI.
*
* @var string
*/
public $uri;
/**
* The fields that should be used when resolving bindings.
*
* @var array
*/
public $bindingFields = [];
/**
* Create a new route URI instance.
*
... | $uri, $matches);
$bindingFields = [];
foreach ($matches[0] as $match) {
if (! str_contains($match, ':')) {
continue;
}
$segments = explode(':', trim($match, '{}?'));
$bindi | ndingFields = $bindingFields;
}
/**
* Parse the given URI.
*
* @param string $uri
* @return static
*/
public static function parse($uri)
{
preg_match_all('/\{([\w\:]+?)\??\}/', | {
"filepath": "src/Illuminate/Routing/RouteUri.php",
"language": "php",
"file_size": 1296,
"cut_index": 524,
"middle_length": 229
} |
losure;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use JsonSerializable;
use Throwable;
class Batch implements Arrayable, JsonSerializable
{
/**
* The queue factory implementation.
*
* @var \Illuminate\Contracts\Queue\Factory
*/
protected $queue;
/**
* The repo... | umber of jobs that are still pending.
*
* @var int
*/
public $pendingJobs;
/**
* The total number of jobs that have failed.
*
* @var int
*/
public $failedJobs;
/**
* The IDs of the jobs that have fa | /**
* The batch name.
*
* @var string
*/
public $name;
/**
* The total number of jobs that belong to the batch.
*
* @var int
*/
public $totalJobs;
/**
* The total n | {
"filepath": "src/Illuminate/Bus/Batch.php",
"language": "php",
"file_size": 13294,
"cut_index": 921,
"middle_length": 229
} |
erface BatchRepository
{
/**
* Retrieve a list of batches.
*
* @param int $limit
* @param mixed $before
* @return \Illuminate\Bus\Batch[]
*/
public function get($limit, $before);
/**
* Retrieve information about an existing batch.
*
* @param string $batchI... | ount
* @return void
*/
public function incrementTotalJobs(string $batchId, int $amount);
/**
* Decrement the total number of pending jobs for the batch.
*
* @param string $batchId
* @param string $jobId
* @re | atch
* @return \Illuminate\Bus\Batch
*/
public function store(PendingBatch $batch);
/**
* Increment the total number of jobs within the batch.
*
* @param string $batchId
* @param int $am | {
"filepath": "src/Illuminate/Bus/BatchRepository.php",
"language": "php",
"file_size": 2319,
"cut_index": 563,
"middle_length": 229
} |
use Illuminate\Contracts\Bus\Dispatcher as DispatcherContract;
use Illuminate\Contracts\Bus\QueueingDispatcher as QueueingDispatcherContract;
use Illuminate\Contracts\Queue\Factory as QueueFactoryContract;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\Arr;
use Illuminate\Support\ServicePr... | ::class)->connection($connection);
});
});
$this->registerBatchServices();
$this->app->alias(
Dispatcher::class, DispatcherContract::class
);
$this->app->alias(
DispatcherContra | egister()
{
$this->app->singleton(Dispatcher::class, function ($app) {
return new Dispatcher($app, function ($connection = null) {
return Container::getInstance()->make(QueueFactoryContract | {
"filepath": "src/Illuminate/Bus/BusServiceProvider.php",
"language": "php",
"file_size": 3470,
"cut_index": 614,
"middle_length": 229
} |
* @var string|null
*/
public $connection;
/**
* The name of the queue the job should be sent to.
*
* @var string|null
*/
public $queue;
/**
* The job "group" the job should be sent to.
*
* @var string|null
*/
public $messageGroup;
/**
* The ... | \DateTimeInterface|\DateInterval|array|int|null
*/
public $delay;
/**
* Indicates whether the job should be dispatched after all database transactions have committed.
*
* @var bool|null
*/
public $afterCommit;
/** | **
* The lock owner token for debounce supersession checks.
*
* @var string
*/
public $debounceOwner = '';
/**
* The number of seconds before the job should be made available.
*
* @var | {
"filepath": "src/Illuminate/Bus/Queueable.php",
"language": "php",
"file_size": 9279,
"cut_index": 921,
"middle_length": 229
} |
amespace Illuminate\Bus;
class UpdatedBatchJobCounts
{
/**
* The number of pending jobs remaining for the batch.
*
* @var int
*/
public $pendingJobs;
/**
* The number of failed jobs that belong to the batch.
*
* @var int
*/
public $failedJobs;
/**
* Cr... | $this->failedJobs = $failedJobs;
}
/**
* Determine if all jobs have run exactly once.
*
* @return bool
*/
public function allJobsHaveRanExactlyOnce()
{
return ($this->pendingJobs - $this->failedJobs) === 0;
| {
$this->pendingJobs = $pendingJobs;
| {
"filepath": "src/Illuminate/Bus/UpdatedBatchJobCounts.php",
"language": "php",
"file_size": 836,
"cut_index": 520,
"middle_length": 52
} |
ts\Database\Eloquent;
use Illuminate\Database\Eloquent\Model;
/**
* @template TGet
* @template TSet
*/
interface CastsAttributes
{
/**
* Transform the attribute from the underlying model values.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mi... | alues.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param TSet|null $value
* @param array<string, mixed> $attributes
* @return mixed
*/
public function set(Model $model, string | * Transform the attribute to its underlying model v | {
"filepath": "src/Illuminate/Contracts/Database/Eloquent/CastsAttributes.php",
"language": "php",
"file_size": 898,
"cut_index": 547,
"middle_length": 52
} |
TClass of object
*
* @param string|class-string<TClass> $id
* @return ($id is class-string<TClass> ? TClass : mixed)
*/
public function get(string $id);
/**
* Determine if the given abstract type has been bound.
*
* @param string $abstract
* @return bool
*/
... | */
public function tag($abstracts, $tags);
/**
* Resolve all of the bindings for a given tag.
*
* @param string $tag
* @return iterable
*/
public function tagged($tag);
/**
* Register a binding with th | ows \LogicException
*/
public function alias($abstract, $alias);
/**
* Assign a set of tags to a given binding.
*
* @param array|string $abstracts
* @param mixed ...$tags
* @return void
| {
"filepath": "src/Illuminate/Contracts/Container/Container.php",
"language": "php",
"file_size": 6157,
"cut_index": 716,
"middle_length": 229
} |
BatchFactory
*/
protected $factory;
/**
* The database connection instance.
*
* @var \Illuminate\Database\Connection
*/
protected $connection;
/**
* The database table to use to store batch information.
*
* @var string
*/
protected $table;
/**
... | **
* Retrieve a list of batches.
*
* @param int $limit
* @param mixed $before
* @return \Illuminate\Bus\Batch[]
*/
public function get($limit = 50, $before = null)
{
return $this->connection->table($this->t | e
*/
public function __construct(BatchFactory $factory, Connection $connection, string $table)
{
$this->factory = $factory;
$this->connection = $connection;
$this->table = $table;
}
/ | {
"filepath": "src/Illuminate/Bus/DatabaseBatchRepository.php",
"language": "php",
"file_size": 11055,
"cut_index": 921,
"middle_length": 229
} |
pace Illuminate\Routing;
use Illuminate\Contracts\Routing\ResponseFactory;
class ViewController extends Controller
{
/**
* The response factory implementation.
*
* @var \Illuminate\Contracts\Routing\ResponseFactory
*/
protected $response;
/**
* Create a new controller instance.
... | nction ($key) {
return ! in_array($key, ['view', 'data', 'status', 'headers']);
}, ARRAY_FILTER_USE_KEY);
$args['data'] = array_merge($args['data'], $routeParameters);
return $this->response->view(
$args['v | }
/**
* Invoke the controller method.
*
* @param mixed ...$args
* @return \Illuminate\Http\Response
*/
public function __invoke(...$args)
{
$routeParameters = array_filter($args, fu | {
"filepath": "src/Illuminate/Routing/ViewController.php",
"language": "php",
"file_size": 1425,
"cut_index": 524,
"middle_length": 229
} |
use Illuminate\Support\Str;
class UrlGenerationException extends Exception
{
/**
* Create a new exception for missing route parameters.
*
* @param \Illuminate\Routing\Route $route
* @param array $parameters
* @return static
*/
public static function forMissingParameters(Route ... | ute->getName(),
$route->uri()
);
if ($parameters !== []) {
$message .= sprintf(' [Missing %s: %s]', $parameterLabel, implode(', ', $parameters));
}
$message .= '.';
return new static($messa | : %s]',
$parameterLabel,
$ro | {
"filepath": "src/Illuminate/Routing/Exceptions/UrlGenerationException.php",
"language": "php",
"file_size": 927,
"cut_index": 606,
"middle_length": 52
} |
Immutable;
use Illuminate\Container\Container;
use Illuminate\Support\Str;
use Illuminate\Support\Testing\Fakes\BatchFake;
trait Batchable
{
/**
* The batch ID (if applicable).
*
* @var string|null
*/
public $batchId;
/**
* The fake batch, if applicable.
*
* @var \Illumi... | is->batchId);
}
}
/**
* Determine if the batch is still active and processing.
*
* @return bool
*/
public function batching()
{
$batch = $this->batch();
return $batch && ! $batch->cancelled();
|
public function batch()
{
if ($this->fakeBatch) {
return $this->fakeBatch;
}
if ($this->batchId) {
return Container::getInstance()->make(BatchRepository::class)?->find($th | {
"filepath": "src/Illuminate/Bus/Batchable.php",
"language": "php",
"file_size": 2836,
"cut_index": 563,
"middle_length": 229
} |
te\Bus;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Queue\Attributes\ReadsQueueAttributes;
use Illuminate\Queue\Attributes\UniqueFor;
class UniqueLock
{
use ReadsQueueAttributes;
/**
* The cache repository implementation.
*
* @var \Illuminate\Contracts\Cache\Repository
... | $uniqueFor = method_exists($job, 'uniqueFor')
? $job->uniqueFor()
: ($this->getAttributeValue($job, UniqueFor::class, 'uniqueFor') ?? 0);
$cache = method_exists($job, 'uniqueVia')
? ($job->uniqueVia() ?? $th | ruct(Cache $cache)
{
$this->cache = $cache;
}
/**
* Attempt to acquire a lock for the given job.
*
* @param mixed $job
* @return bool
*/
public function acquire($job)
{
| {
"filepath": "src/Illuminate/Bus/UniqueLock.php",
"language": "php",
"file_size": 1984,
"cut_index": 537,
"middle_length": 229
} |
e Illuminate\Database\Eloquent\Relations\Relation;
class ModelIdentifier
{
/**
* Use the Relation morphMap for a Model's name when serializing.
*/
protected static bool $useMorphMap = false;
/**
* The class name of the model.
*
* @var class-string<\Illuminate\Database\Eloquent\Mod... | connection;
/**
* The class name of the model collection.
*
* @var class-string<\Illuminate\Database\Eloquent\Collection>|null
*/
public $collectionClass;
/**
* Create a new model identifier.
*
* @param cla |
public $id;
/**
* The relationships loaded on the model.
*
* @var array
*/
public $relations;
/**
* The connection name of the model.
*
* @var string|null
*/
public $ | {
"filepath": "src/Illuminate/Contracts/Database/ModelIdentifier.php",
"language": "php",
"file_size": 2538,
"cut_index": 563,
"middle_length": 229
} |
\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\PendingChain;
use Illuminate\Pipeline\Pipeline;
use Illuminate\Queue\Attributes\Connection;
use Illuminate\Queue\Attributes\Delay;
use Illuminate\Queue\Attributes\Queue as QueueAttribute;
use Illuminate\Queue\Attributes\ReadsQueueAttributes;
use Illuminate\Queue\Interac... | The pipeline instance for the bus.
*
* @var \Illuminate\Pipeline\Pipeline
*/
protected $pipeline;
/**
* The pipes to send commands through before dispatching.
*
* @var array
*/
protected $pipes = [];
/* | QueueingDispatcher
{
use ReadsQueueAttributes, ResolvesQueueRoutes;
/**
* The container implementation.
*
* @var \Illuminate\Contracts\Container\Container
*/
protected $container;
/**
* | {
"filepath": "src/Illuminate/Bus/Dispatcher.php",
"language": "php",
"file_size": 8765,
"cut_index": 716,
"middle_length": 229
} |
te\Bus;
use Carbon\CarbonImmutable;
use Illuminate\Contracts\Queue\Factory as QueueFactory;
class BatchFactory
{
/**
* The queue factory implementation.
*
* @var \Illuminate\Contracts\Queue\Factory
*/
protected $queue;
/**
* Create a new batch factory instance.
*
* @par... | * @param array $failedJobIds
* @param array $options
* @param \Carbon\CarbonImmutable $createdAt
* @param \Carbon\CarbonImmutable|null $cancelledAt
* @param \Carbon\CarbonImmutable|null $finishedAt
* @return \Illuminate\B | nce.
*
* @param \Illuminate\Bus\BatchRepository $repository
* @param string $id
* @param string $name
* @param int $totalJobs
* @param int $pendingJobs
* @param int $failedJobs
| {
"filepath": "src/Illuminate/Bus/BatchFactory.php",
"language": "php",
"file_size": 1728,
"cut_index": 537,
"middle_length": 229
} |
?php
namespace Illuminate\Contracts\Database\Eloquent;
interface SupportsPartialRelations
{
/**
* Indicate that the relation is a single result of a larger one-to-many relationship.
*
* @param string|null $column
* @param string|\Closure|null $aggregate
* @param string|null $relatio... | * @return bool
*/
public function isOneOfMany();
/**
* Get the one of many inner join subselect query builder instance.
*
* @return \Illuminate\Database\Eloquent\Builder|void
*/
public function getOneOfManySubQuery(); | p.
*
| {
"filepath": "src/Illuminate/Contracts/Database/Eloquent/SupportsPartialRelations.php",
"language": "php",
"file_size": 786,
"cut_index": 513,
"middle_length": 14
} |
esponse;
use RuntimeException;
use Throwable;
class StreamedResponseException extends RuntimeException
{
/**
* The actual exception thrown during the stream.
*
* @var \Throwable
*/
public $originalException;
/**
* Create a new exception instance.
*
* @param \Throwable ... | he exception.
*
* @return \Illuminate\Http\Response
*/
public function render()
{
return new Response('');
}
/**
* Get the actual exception thrown during the stream.
*
* @return \Throwable
*/
| ption->getMessage());
}
/**
* Render t | {
"filepath": "src/Illuminate/Routing/Exceptions/StreamedResponseException.php",
"language": "php",
"file_size": 981,
"cut_index": 582,
"middle_length": 52
} |
;
use function Illuminate\Support\enum_value;
class PendingBatch
{
use Conditionable;
/**
* The IoC container instance.
*
* @var \Illuminate\Contracts\Container\Container
*/
protected $container;
/**
* The batch name.
*
* @var string
*/
public $name = '';
... | new pending batch instance.
*
* @param \Illuminate\Contracts\Container\Container $container
* @param \Illuminate\Support\Collection $jobs
*/
public function __construct(Container $container, Collection $jobs)
{
$this | */
public $options = [];
/**
* Jobs that have been verified to contain the Batchable trait.
*
* @var array<class-string, bool>
*/
protected static $batchableClasses = [];
/**
* Create a | {
"filepath": "src/Illuminate/Bus/PendingBatch.php",
"language": "php",
"file_size": 11315,
"cut_index": 921,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.