prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
hp
namespace Illuminate\Contracts\Encryption;
interface Encrypter
{
/**
* Encrypt the given value.
*
* @param mixed $value
* @param bool $serialize
* @return string
*
* @throws \Illuminate\Contracts\Encryption\EncryptException
*/
public function encrypt(#[\Sensitive... | */
public function getKey();
/**
* Get the current encryption key and all previous encryption keys.
*
* @return array
*/
public function getAllKeys();
/**
* Get the previous encryption keys.
*
* @re | ows \Illuminate\Contracts\Encryption\DecryptException
*/
public function decrypt($payload, $unserialize = true);
/**
* Get the encryption key that the encrypter is currently using.
*
* @return string
| {
"filepath": "src/Illuminate/Contracts/Encryption/Encrypter.php",
"language": "php",
"file_size": 1060,
"cut_index": 515,
"middle_length": 229
} |
te\Contracts\Mail;
use Illuminate\Contracts\Queue\Factory as Queue;
interface Mailable
{
/**
* Send the message using the given mailer.
*
* @param \Illuminate\Contracts\Mail\Factory|\Illuminate\Contracts\Mail\Mailer $mailer
* @return \Illuminate\Mail\SentMessage|null
*/
public funct... | ic function later($delay, Queue $queue);
/**
* Set the recipients of the message.
*
* @param object|array|string $address
* @param string|null $name
* @return $this
*/
public function cc($address, $name = null);
| e);
/**
* Deliver the queued message after (n) seconds.
*
* @param \DateTimeInterface|\DateInterval|int $delay
* @param \Illuminate\Contracts\Queue\Factory $queue
* @return mixed
*/
publ | {
"filepath": "src/Illuminate/Contracts/Mail/Mailable.php",
"language": "php",
"file_size": 1791,
"cut_index": 537,
"middle_length": 229
} |
ionSuggestions;
use Symfony\Component\Console\Completion\Suggestion;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Finder\Finder;
abstract class GeneratorCommand extends Command implements PromptsForMissingInput
{
use FindsAvailableModels;
/**
* The filesystem instance.
*
... | reak',
'callable',
'case',
'catch',
'class',
'clone',
'const',
'continue',
'declare',
'default',
'die',
'do',
'echo',
'else',
'elseif',
| * Reserved names that cannot be used for generation.
*
* @var string[]
*/
protected $reservedNames = [
'__halt_compiler',
'abstract',
'and',
'array',
'as',
'b | {
"filepath": "src/Illuminate/Console/GeneratorCommand.php",
"language": "php",
"file_size": 14296,
"cut_index": 921,
"middle_length": 229
} |
Countable;
interface MessageBag extends Arrayable, Countable
{
/**
* Get the keys present in the message bag.
*
* @return array
*/
public function keys();
/**
* Add a message to the bag.
*
* @param string $key
* @param string $message
* @return $this
... | /**
* Get the first message from the bag for a given key.
*
* @param string|null $key
* @param string|null $format
* @return string
*/
public function first($key = null, $format = null);
/**
* Get all of the | * @return $this
*/
public function merge($messages);
/**
* Determine if messages exist for a given key.
*
* @param string|array $key
* @return bool
*/
public function has($key);
| {
"filepath": "src/Illuminate/Contracts/Support/MessageBag.php",
"language": "php",
"file_size": 2234,
"cut_index": 563,
"middle_length": 229
} |
* The private visibility setting.
*
* @var string
*/
const VISIBILITY_PRIVATE = 'private';
/**
* Get the full path to the file that exists at the given relative path.
*
* @param string $path
* @return string
*/
public function path($path);
/**
* Deter... | */
public function readStream($path);
/**
* Write the contents of a file.
*
* @param string $path
* @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents | ng $path
* @return string|null
*/
public function get($path);
/**
* Get a resource to read the file.
*
* @param string $path
* @return resource|null The path resource or null on failure.
| {
"filepath": "src/Illuminate/Contracts/Filesystem/Filesystem.php",
"language": "php",
"file_size": 5124,
"cut_index": 716,
"middle_length": 229
} |
te\Contracts\View;
interface Factory
{
/**
* Determine if a given view exists.
*
* @param string $view
* @return bool
*/
public function exists($view);
/**
* Get the evaluated view contents for the given path.
*
* @param string $path
* @param \Illuminate\C... | \Contracts\View\View
*/
public function make($view, $data = [], $mergeData = []);
/**
* Add a piece of shared data to the environment.
*
* @param array|string $key
* @param mixed $value
* @return mixed
*/
| /**
* Get the evaluated view contents for the given view.
*
* @param string $view
* @param \Illuminate\Contracts\Support\Arrayable|array $data
* @param array $mergeData
* @return \Illuminate | {
"filepath": "src/Illuminate/Contracts/View/Factory.php",
"language": "php",
"file_size": 1933,
"cut_index": 537,
"middle_length": 229
} |
the translation for a given key.
*
* @param string $key
* @param array $replace
* @param string|null $locale
* @return mixed
*/
public function get($key, array $replace = [], $locale = null);
/**
* Get a translation according to an integer value.
*
* @param s... | /**
* Get the default locale being used.
*
* @return string
*/
public function getLocale();
/**
* Set the default locale.
*
* @param string $locale
* @return void
*/
public function setLocale($lo | $number, array $replace = [], $locale = null);
| {
"filepath": "src/Illuminate/Contracts/Translation/Translator.php",
"language": "php",
"file_size": 923,
"cut_index": 606,
"middle_length": 52
} |
*
* @return string|null
*/
public function uuid();
/**
* Get the job identifier.
*
* @return string
*/
public function getJobId();
/**
* Get the decoded body of the job.
*
* @return array
*/
public function payload();
/**
* Fire the ... | queue.
*
* @return void
*/
public function delete();
/**
* Determine if the job has been deleted.
*
* @return bool
*/
public function isDeleted();
/**
* Determine if the job has been deleted or rel |
*/
public function release($delay = 0);
/**
* Determine if the job was released back into the queue.
*
* @return bool
*/
public function isReleased();
/**
* Delete the job from the | {
"filepath": "src/Illuminate/Contracts/Queue/Job.php",
"language": "php",
"file_size": 3280,
"cut_index": 614,
"middle_length": 229
} |
Illuminate\Contracts\Queue;
interface Monitor
{
/**
* Register a callback to be executed when a daemon queue is starting.
*
* @param mixed $callback
* @return void
*/
public function starting($callback);
/**
* Register a callback to be executed on every iteration through th... | am mixed $callback
* @return void
*/
public function failing($callback);
/**
* Register a callback to be executed when a daemon queue is stopping.
*
* @param mixed $callback
* @return void
*/
public funct | er the maximum number of retries.
*
* @par | {
"filepath": "src/Illuminate/Contracts/Queue/Monitor.php",
"language": "php",
"file_size": 864,
"cut_index": 529,
"middle_length": 52
} |
hp
namespace Illuminate\Contracts\Auth;
interface Authenticatable
{
/**
* Get the name of the unique identifier for the user.
*
* @return string
*/
public function getAuthIdentifierName();
/**
* Get the unique identifier for the user.
*
* @return mixed
*/
publi... | nction getRememberToken();
/**
* Set the token value for the "remember me" session.
*
* @param string $value
* @return void
*/
public function setRememberToken($value);
/**
* Get the column name for the "rememb | * Get the password for the user.
*
* @return string
*/
public function getAuthPassword();
/**
* Get the token value for the "remember me" session.
*
* @return string
*/
public fu | {
"filepath": "src/Illuminate/Contracts/Auth/Authenticatable.php",
"language": "php",
"file_size": 1097,
"cut_index": 515,
"middle_length": 229
} |
te\Contracts\Mail;
interface Mailer
{
/**
* Begin the process of mailing a mailable class instance.
*
* @param mixed $users
* @return \Illuminate\Mail\PendingMail
*/
public function to($users);
/**
* Begin the process of mailing a mailable class instance.
*
* @par... | ack
* @return \Illuminate\Mail\SentMessage|null
*/
public function raw($text, $callback);
/**
* Send a new message using a view.
*
* @param \Illuminate\Contracts\Mail\Mailable|string|array $view
* @param array $da | am mixed $users
* @return \Illuminate\Mail\PendingMail
*/
public function bcc($users);
/**
* Send a new message with only a raw text part.
*
* @param string $text
* @param mixed $callb | {
"filepath": "src/Illuminate/Contracts/Mail/Mailer.php",
"language": "php",
"file_size": 1553,
"cut_index": 537,
"middle_length": 229
} |
ng $content
* @param int $status
* @param array $headers
* @return \Illuminate\Http\Response
*/
public function make($content = '', $status = 200, array $headers = []);
/**
* Create a new "no content" response.
*
* @param int $status
* @param array $headers
... | []);
/**
* Create a new JSON response instance.
*
* @param mixed $data
* @param int $status
* @param array $headers
* @param int $options
* @return \Illuminate\Http\JsonResponse
*/
public function j | ring|array $view
* @param array $data
* @param int $status
* @param array $headers
* @return \Illuminate\Http\Response
*/
public function view($view, $data = [], $status = 200, array $headers = | {
"filepath": "src/Illuminate/Contracts/Routing/ResponseFactory.php",
"language": "php",
"file_size": 5564,
"cut_index": 716,
"middle_length": 229
} |
erface UrlGenerator
{
/**
* Get the current URL for the request.
*
* @return string
*/
public function current();
/**
* Get the URL for the previous request.
*
* @param mixed $fallback
* @return string
*/
public function previous($fallback = false);
/... | function secure($path, $parameters = []);
/**
* Generate the URL to an application asset.
*
* @param string $path
* @param bool|null $secure
* @return string
*/
public function asset($path, $secure = null);
/ | c function to($path, $extra = [], $secure = null);
/**
* Generate a secure, absolute URL to the given path.
*
* @param string $path
* @param array $parameters
* @return string
*/
public | {
"filepath": "src/Illuminate/Contracts/Routing/UrlGenerator.php",
"language": "php",
"file_size": 3009,
"cut_index": 563,
"middle_length": 229
} |
te\Contracts\Bus;
interface Dispatcher
{
/**
* Dispatch a command to its appropriate handler.
*
* @param mixed $command
* @return mixed
*/
public function dispatch($command);
/**
* Dispatch a command to its appropriate handler in the current process.
*
* Queueable... | $command, $handler = null);
/**
* Dispatch a command to its appropriate handler after the current process.
*
* @param mixed $command
* @param mixed $handler
* @return void
*/
public function dispatchAfterResponse( | ler = null);
/**
* Dispatch a command to its appropriate handler in the current process.
*
* @param mixed $command
* @param mixed $handler
* @return mixed
*/
public function dispatchNow( | {
"filepath": "src/Illuminate/Contracts/Bus/Dispatcher.php",
"language": "php",
"file_size": 1931,
"cut_index": 537,
"middle_length": 229
} |
/**
* Get information about the given hashed value.
*
* @param string $hashedValue
* @return array
*/
public function info($hashedValue);
/**
* Hash the given value.
*
* @param string $value
* @param array $options
* @return string
*/
public fun... | ool
*/
public function check(#[\SensitiveParameter] $value, $hashedValue, array $options = []);
/**
* Check if the given hash has been hashed using the given options.
*
* @param string $hashedValue
* @param array $opti | alue
* @param array $options
* @return b | {
"filepath": "src/Illuminate/Contracts/Hashing/Hasher.php",
"language": "php",
"file_size": 992,
"cut_index": 582,
"middle_length": 52
} |
te\Contracts\Auth;
interface StatefulGuard extends Guard
{
/**
* Attempt to authenticate a user using the given credentials.
*
* @param array $credentials
* @param bool $remember
* @return bool
*/
public function attempt(array $credentials = [], $remember = false);
/**
... | mber = false);
/**
* Log the given user ID into the application.
*
* @param mixed $id
* @param bool $remember
* @return \Illuminate\Contracts\Auth\Authenticatable|false
*/
public function loginUsingId($id, $rememb | /**
* Log a user into the application.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param bool $remember
* @return void
*/
public function login(Authenticatable $user, $reme | {
"filepath": "src/Illuminate/Contracts/Auth/StatefulGuard.php",
"language": "php",
"file_size": 1538,
"cut_index": 537,
"middle_length": 229
} |
en ability has been defined.
*
* @param \UnitEnum|string $ability
* @return bool
*/
public function has($ability);
/**
* Define a new ability.
*
* @param \UnitEnum|string $ability
* @param callable|string $callback
* @return $this
*/
public function d... | turn $this
*/
public function policy($class, $policy);
/**
* Register a callback to run before all Gate checks.
*
* @param callable $callback
* @return $this
*/
public function before(callable $callback);
/ | urn $this
*/
public function resource($name, $class, ?array $abilities = null);
/**
* Define a policy class for a given class type.
*
* @param string $class
* @param string $policy
* @re | {
"filepath": "src/Illuminate/Contracts/Auth/Access/Gate.php",
"language": "php",
"file_size": 3798,
"cut_index": 614,
"middle_length": 229
} |
session.
*
* @return string
*/
public function getName();
/**
* Set the name of the session.
*
* @param string $name
* @return void
*/
public function setName($name);
/**
* Get the current session ID.
*
* @return string
*/
public funct... | ssion data.
*
* @return array
*/
public function all();
/**
* Checks if a key exists.
*
* @param string|array $key
* @return bool
*/
public function exists($key);
/**
* Checks if a key is pre | ta from a handler.
*
* @return bool
*/
public function start();
/**
* Save the session data to storage.
*
* @return void
*/
public function save();
/**
* Get all of the se | {
"filepath": "src/Illuminate/Contracts/Session/Session.php",
"language": "php",
"file_size": 4099,
"cut_index": 614,
"middle_length": 229
} |
face Queue
{
/**
* Get the size of the queue.
*
* @param string|null $queue
* @return int
*/
public function size($queue = null);
/**
* Get the number of pending jobs.
*
* @param string|null $queue
* @return int
*/
public function pendingSize($queue... | delayed jobs.
*
* @param string|null $queue
* @return int|null
*/
public function creationTimeOfOldestPendingJob($queue = null);
/**
* Push a new job onto the queue.
*
* @param string|object $job
* @par | et the number of reserved jobs.
*
* @param string|null $queue
* @return int
*/
public function reservedSize($queue = null);
/**
* Get the creation timestamp of the oldest pending job, excluding | {
"filepath": "src/Illuminate/Contracts/Queue/Queue.php",
"language": "php",
"file_size": 3033,
"cut_index": 563,
"middle_length": 229
} |
erface Registrar
{
/**
* Register a new GET route with the router.
*
* @param string $uri
* @param array|string|callable $action
* @return \Illuminate\Routing\Route
*/
public function get($uri, $action);
/**
* Register a new POST route with the router.
*
* @... | route with the router.
*
* @param string $uri
* @param array|string|callable $action
* @return \Illuminate\Routing\Route
*/
public function delete($uri, $action);
/**
* Register a new PATCH route with the router. | oute with the router.
*
* @param string $uri
* @param array|string|callable $action
* @return \Illuminate\Routing\Route
*/
public function put($uri, $action);
/**
* Register a new DELETE | {
"filepath": "src/Illuminate/Contracts/Routing/Registrar.php",
"language": "php",
"file_size": 2691,
"cut_index": 563,
"middle_length": 229
} |
interface UrlRoutable
{
/**
* Get the value of the model's route key.
*
* @return mixed
*/
public function getRouteKey();
/**
* Get the route key for the model.
*
* @return string
*/
public function getRouteKeyName();
/**
* Retrieve the model for a bou... | model for a bound value.
*
* @param string $childType
* @param mixed $value
* @param string|null $field
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function resolveChildRouteBinding($childType, $valu | $field = null);
/**
* Retrieve the child | {
"filepath": "src/Illuminate/Contracts/Routing/UrlRoutable.php",
"language": "php",
"file_size": 881,
"cut_index": 559,
"middle_length": 52
} |
pace Illuminate\Contracts\Auth;
use Closure;
interface PasswordBroker
{
/**
* Constant representing a successfully sent reminder.
*
* @var string
*/
const RESET_LINK_SENT = 'passwords.sent';
/**
* Constant representing a successfully reset password.
*
* @var string
... | */
const RESET_THROTTLED = 'passwords.throttled';
/**
* Send a password reset link to a user.
*
* @param array $credentials
* @param \Closure|null $callback
* @return string
*/
public function sendResetLin | ;
/**
* Constant representing an invalid token.
*
* @var string
*/
const INVALID_TOKEN = 'passwords.token';
/**
* Constant representing a throttled reset attempt.
*
* @var string
| {
"filepath": "src/Illuminate/Contracts/Auth/PasswordBroker.php",
"language": "php",
"file_size": 1289,
"cut_index": 524,
"middle_length": 229
} |
space Illuminate\Contracts\Translation;
interface Loader
{
/**
* Load the messages for the given locale.
*
* @param string $locale
* @param string $group
* @param string|null $namespace
* @return array
*/
public function load($locale, $group, $namespace = null);
/*... | .
*
* @param string $path
* @return void
*/
public function addJsonPath($path);
/**
* Get an array of all the registered namespaces.
*
* @return array<string, string>
*/
public function namespaces();
} | );
/**
* Add a new JSON path to the loader | {
"filepath": "src/Illuminate/Contracts/Translation/Loader.php",
"language": "php",
"file_size": 832,
"cut_index": 523,
"middle_length": 52
} |
namespace Illuminate\Contracts\Auth;
interface MustVerifyEmail
{
/**
* Determine if the user has verified their email address.
*
* @return bool
*/
public function hasVerifiedEmail();
/**
* Mark the given user's email as verified.
*
* @return bool
*/
public fun... | ation notification.
*
* @return void
*/
public function sendEmailVerificationNotification();
/**
* Get the email address that should be used for verification.
*
* @return string
*/
public function getEmailFor | email verific | {
"filepath": "src/Illuminate/Contracts/Auth/MustVerifyEmail.php",
"language": "php",
"file_size": 805,
"cut_index": 517,
"middle_length": 14
} |
te\Contracts\Auth;
interface UserProvider
{
/**
* Retrieve a user by their unique identifier.
*
* @param mixed $identifier
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function retrieveById($identifier);
/**
* Retrieve a user by their unique identifie... | $token
* @return void
*/
public function updateRememberToken(Authenticatable $user, #[\SensitiveParameter] $token);
/**
* Retrieve a user by the given credentials.
*
* @param array $credentials
* @return \Illumina | rieveByToken($identifier, #[\SensitiveParameter] $token);
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string | {
"filepath": "src/Illuminate/Contracts/Auth/UserProvider.php",
"language": "php",
"file_size": 1828,
"cut_index": 537,
"middle_length": 229
} |
p
namespace Illuminate\Contracts\Broadcasting;
interface Broadcaster
{
/**
* Authenticate the incoming request for a given channel.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
public function auth($request);
/**
* Return the valid authentication respons... | @param array $channels
* @param string $event
* @param array $payload
* @return void
*
* @throws \Illuminate\Broadcasting\BroadcastException
*/
public function broadcast(array $channels, $event, array $payload = []); | /**
* Broadcast the given event.
*
* | {
"filepath": "src/Illuminate/Contracts/Broadcasting/Broadcaster.php",
"language": "php",
"file_size": 827,
"cut_index": 516,
"middle_length": 52
} |
pace Illuminate\Contracts\Validation;
use Illuminate\Contracts\Support\MessageProvider;
interface Validator extends MessageProvider
{
/**
* Run the validator's rules against its data.
*
* @return array
*
* @throws \Illuminate\Validation\ValidationException
*/
public function vali... | */
public function failed();
/**
* Add conditions to a given field based on a Closure.
*
* @param string|array $attribute
* @param string|array $rules
* @param callable $callback
* @return $this
*/
publ | ion validated();
/**
* Determine if the data fails the validation rules.
*
* @return bool
*/
public function fails();
/**
* Get the failed validation rules.
*
* @return array
| {
"filepath": "src/Illuminate/Contracts/Validation/Validator.php",
"language": "php",
"file_size": 1389,
"cut_index": 524,
"middle_length": 229
} |
ace Repository extends CacheInterface
{
/**
* Retrieve an item from the cache and delete it.
*
* @template TCacheValue
*
* @param \UnitEnum|array|string $key
* @param TCacheValue|(\Closure(): TCacheValue) $default
* @return (TCacheValue is null ? mixed : TCacheValue)
*/
... | ey
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|int|null $ttl
* @return bool
*/
public function add($key, $value, $ttl = null);
/**
* Increment the value of an item in the cache.
*
* @param | terface|\DateInterval|int|null $ttl
* @return bool
*/
public function put($key, $value, $ttl = null);
/**
* Store an item in the cache if the key does not exist.
*
* @param \UnitEnum|string $k | {
"filepath": "src/Illuminate/Contracts/Cache/Repository.php",
"language": "php",
"file_size": 3224,
"cut_index": 614,
"middle_length": 229
} |
terface Kernel
{
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap();
/**
* Handle an incoming HTTP request.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @return \Symfony\Component\HttpFoundation\Res... | Response $response
* @return void
*/
public function terminate($request, $response);
/**
* Get the Laravel application instance.
*
* @return \Illuminate\Contracts\Foundation\Application
*/
public function getAppl | st
* @param \Symfony\Component\HttpFoundation\ | {
"filepath": "src/Illuminate/Contracts/Http/Kernel.php",
"language": "php",
"file_size": 880,
"cut_index": 559,
"middle_length": 52
} |
namespace Illuminate\Contracts\Debug;
use Throwable;
/**
* @method bool isReporting(\Throwable $e)
* @method array buildContextForException()
*/
interface ExceptionHandler
{
/**
* Report or log an exception.
*
* @param \Throwable $e
* @return void
*
* @throws \Throwable
*/... | e
*
* @throws \Throwable
*/
public function render($request, Throwable $e);
/**
* Render an exception to the console.
*
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @param \Throwable $ | houldReport(Throwable $e);
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $e
* @return \Symfony\Component\HttpFoundation\Respons | {
"filepath": "src/Illuminate/Contracts/Debug/ExceptionHandler.php",
"language": "php",
"file_size": 1194,
"cut_index": 518,
"middle_length": 229
} |
* @return string
*/
public function version();
/**
* Get the base path of the Laravel installation.
*
* @param string $path
* @return string
*/
public function basePath($path = '');
/**
* Get the path to the bootstrap directory.
*
* @param string ... | h = '');
/**
* Get the path to the language files.
*
* @param string $path
* @return string
*/
public function langPath($path = '');
/**
* Get the path to the public directory.
*
* @param string $pa | * @return string
*/
public function configPath($path = '');
/**
* Get the path to the database directory.
*
* @param string $path
* @return string
*/
public function databasePath($pat | {
"filepath": "src/Illuminate/Contracts/Foundation/Application.php",
"language": "php",
"file_size": 5606,
"cut_index": 716,
"middle_length": 229
} |
te\Contracts\Process;
interface ProcessResult
{
/**
* Get the original command executed by the process.
*
* @return string
*/
public function command();
/**
* Determine if the process was successful.
*
* @return bool
*/
public function successful();
/**
... | * @param string $output
* @return bool
*/
public function seeInOutput(string $output);
/**
* Get the error output of the process.
*
* @return string
*/
public function errorOutput();
/**
* Determin | public function exitCode();
/**
* Get the standard output of the process.
*
* @return string
*/
public function output();
/**
* Determine if the output contains the given string.
*
| {
"filepath": "src/Illuminate/Contracts/Process/ProcessResult.php",
"language": "php",
"file_size": 1654,
"cut_index": 537,
"middle_length": 229
} |
pace Illuminate\Contracts\Cookie;
interface Factory
{
/**
* Create a new cookie instance.
*
* @param string $name
* @param string $value
* @param int $minutes
* @param string|null $path
* @param string|null $domain
* @param bool|null $secure
* @param bool ... | * @param string|null $path
* @param string|null $domain
* @param bool|null $secure
* @param bool $httpOnly
* @param bool $raw
* @param string|null $sameSite
* @return \Symfony\Component\HttpFoundation\Cookie
| $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);
/**
* Create a cookie that lasts "forever" (400 days).
*
* @param string $name
* @param string $value
| {
"filepath": "src/Illuminate/Contracts/Cookie/Factory.php",
"language": "php",
"file_size": 1433,
"cut_index": 524,
"middle_length": 229
} |
hp
namespace Illuminate\Contracts\Auth;
interface Guard
{
/**
* Determine if the current user is authenticated.
*
* @return bool
*/
public function check();
/**
* Determine if the current user is a guest.
*
* @return bool
*/
public function guest();
/**
... | n validate(array $credentials = []);
/**
* Determine if the guard has a user instance.
*
* @return bool
*/
public function hasUser();
/**
* Set the current user.
*
* @param \Illuminate\Contracts\Auth\Authen | y authenticated user.
*
* @return int|string|null
*/
public function id();
/**
* Validate a user's credentials.
*
* @param array $credentials
* @return bool
*/
public functio | {
"filepath": "src/Illuminate/Contracts/Auth/Guard.php",
"language": "php",
"file_size": 1100,
"cut_index": 515,
"middle_length": 229
} |
/**
* @template TKey of array-key
*
* @template-covariant TValue
*
* @method $this through(callable(TValue): mixed $callback)
*/
interface CursorPaginator
{
/**
* Get the URL for a given cursor.
*
* @param \Illuminate\Pagination\Cursor|null $cursor
* @return string
*/
public fun... | ragment($fragment = null);
/**
* Add all current query string values to the paginator.
*
* @return $this
*/
public function withQueryString();
/**
* Get the URL for the previous page, or null.
*
* @return st | */
public function appends($key, $value = null);
/**
* Get / set the URL fragment to be appended to URLs.
*
* @param string|null $fragment
* @return $this|string|null
*/
public function f | {
"filepath": "src/Illuminate/Contracts/Pagination/CursorPaginator.php",
"language": "php",
"file_size": 2870,
"cut_index": 563,
"middle_length": 229
} |
namespace Illuminate\Contracts\JsonSchema;
use Closure;
interface JsonSchema
{
/**
* Create a new object schema instance.
*
* @param (Closure(JsonSchema): array<string, \Illuminate\JsonSchema\Types\Type>)|array<string, \Illuminate\JsonSchema\Types\Type> $properties
* @return \Illuminate\Jso... | e a new integer property instance.
*
* @return \Illuminate\JsonSchema\Types\IntegerType
*/
public function integer();
/**
* Create a new number property instance.
*
* @return \Illuminate\JsonSchema\Types\NumberType
| Types\ArrayType
*/
public function array();
/**
* Create a new string property instance.
*
* @return \Illuminate\JsonSchema\Types\StringType
*/
public function string();
/**
* Creat | {
"filepath": "src/Illuminate/Contracts/JsonSchema/JsonSchema.php",
"language": "php",
"file_size": 1199,
"cut_index": 518,
"middle_length": 229
} |
\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Exception\CommandNotFoundException;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Compo... | ent dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
* The output from the previous command.
*
* @var \Symfony\Component\Console\Output\BufferedOutput
*/
protect | tion extends SymfonyApplication implements ApplicationContract
{
/**
* The Laravel application instance.
*
* @var \Illuminate\Contracts\Container\Container
*/
protected $laravel;
/**
* The ev | {
"filepath": "src/Illuminate/Console/Application.php",
"language": "php",
"file_size": 9523,
"cut_index": 921,
"middle_length": 229
} |
pace Illuminate\Console;
use function Laravel\Prompts\confirm;
trait ConfirmableTrait
{
/**
* Confirm before proceeding with the action.
*
* This method only asks for confirmation in production.
*
* @template TReturn of bool = bool
*
* @param string $warning
* @param (\C... | n('force')) {
return true;
}
$this->components->alert($warning);
$confirmed = confirm('Are you sure you want to run this command?', default: false);
if (! $confirmed) {
$thi | )
{
$callback = is_null($callback) ? $this->getDefaultConfirmCallback() : $callback;
$shouldConfirm = value($callback);
if ($shouldConfirm) {
if ($this->hasOption('force') && $this->optio | {
"filepath": "src/Illuminate/Console/ConfirmableTrait.php",
"language": "php",
"file_size": 1414,
"cut_index": 524,
"middle_length": 229
} |
te\Console;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
use Symfony\Component\Console\Exception\CommandNotFoundException;
class ContainerCommandLoader implements CommandLoaderInterface
{
/**
* The con... | \Console\Command|string> $commandMap
*/
public function __construct(ContainerInterface $container, array $commandMap)
{
$this->container = $container;
$this->commandMap = $commandMap;
}
/**
* Resolve a command fr | uminate\Console\Command|string>
*/
protected $commandMap;
/**
* Create a new command loader instance.
*
* @param \Psr\Container\ContainerInterface $container
* @param array<string, \Illuminate | {
"filepath": "src/Illuminate/Console/ContainerCommandLoader.php",
"language": "php",
"file_size": 1892,
"cut_index": 537,
"middle_length": 229
} |
ts\Cache;
interface Lock
{
/**
* Attempt to acquire the lock.
*
* @param callable|null $callback
* @return mixed
*/
public function get($callback = null);
/**
* Attempt to acquire the lock for the given number of seconds.
*
* @param int $seconds
* @param c... | */
public function release();
/**
* Returns the current owner of the lock.
*
* @return string
*/
public function owner();
/**
* Releases this lock in disregard of ownership.
*
* @return void
*/
| * Release the lock.
*
* @return bool
| {
"filepath": "src/Illuminate/Contracts/Cache/Lock.php",
"language": "php",
"file_size": 890,
"cut_index": 547,
"middle_length": 52
} |
namespace Illuminate\Contracts\Config;
interface Repository
{
/**
* Determine if the given configuration value exists.
*
* @param string $key
* @return bool
*/
public function has($key);
/**
* Get the specified configuration value.
*
* @param array|string $key
... | value = null);
/**
* Prepend a value onto an array configuration value.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function prepend($key, $value);
/**
* Push a value onto an ar | * @return array
*/
public function all();
/**
* Set a given configuration value.
*
* @param array|string $key
* @param mixed $value
* @return void
*/
public function set($key, $ | {
"filepath": "src/Illuminate/Contracts/Config/Repository.php",
"language": "php",
"file_size": 1162,
"cut_index": 518,
"middle_length": 229
} |
te\Contracts\Process;
interface InvokedProcess
{
/**
* Get the process ID if the process is still running.
*
* @return int|null
*/
public function id();
/**
* Get the command line for the process.
*
* @return string
*/
public function command();
/**
* ... | for the process.
*
* @return string
*/
public function errorOutput();
/**
* Get the latest standard output for the process.
*
* @return string
*/
public function latestOutput();
/**
* Get the latest | .
*
* @return bool
*/
public function running();
/**
* Get the standard output for the process.
*
* @return string
*/
public function output();
/**
* Get the error output | {
"filepath": "src/Illuminate/Contracts/Process/InvokedProcess.php",
"language": "php",
"file_size": 1554,
"cut_index": 537,
"middle_length": 229
} |
te\Contracts\Console;
interface Kernel
{
/**
* Bootstrap the application for artisan commands.
*
* @return void
*/
public function bootstrap();
/**
* Handle an incoming console command.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \S... | y $parameters = [], $outputBuffer = null);
/**
* Queue an Artisan console command by name.
*
* @param string $command
* @param array $parameters
* @return \Illuminate\Foundation\Bus\PendingDispatch
*/
public funct | ame.
*
* @param string $command
* @param array $parameters
* @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
* @return int
*/
public function call($command, arra | {
"filepath": "src/Illuminate/Contracts/Console/Kernel.php",
"language": "php",
"file_size": 1550,
"cut_index": 537,
"middle_length": 229
} |
se Illuminate\Contracts\Cache\Factory as Cache;
use Illuminate\Contracts\Cache\LockProvider;
use Illuminate\Support\InteractsWithTime;
class CacheCommandMutex implements CommandMutex
{
use InteractsWithTime;
/**
* The cache factory implementation.
*
* @var \Illuminate\Contracts\Cache\Factory
... | .
*
* @param \Illuminate\Console\Command $command
* @return bool
*/
public function create($command)
{
$store = $this->cache->store($this->store);
$expiresAt = method_exists($command, 'isolationLockExpiresAt') | *
* @param \Illuminate\Contracts\Cache\Factory $cache
*/
public function __construct(Cache $cache)
{
$this->cache = $cache;
}
/**
* Attempt to obtain a command mutex for the given command | {
"filepath": "src/Illuminate/Console/CacheCommandMutex.php",
"language": "php",
"file_size": 3672,
"cut_index": 614,
"middle_length": 229
} |
namespace Illuminate\Contracts\Validation;
interface Factory
{
/**
* Create a new Validator instance.
*
* @param array $data
* @param array $rules
* @param array $messages
* @param array $attributes
* @return \Illuminate\Contracts\Validation\Validator
*/
public ... |
* @param string $rule
* @param \Closure|string $extension
* @param string|null $message
* @return void
*/
public function extendImplicit($rule, $extension, $message = null);
/**
* Register a custom implicit val | \Closure|string $extension
* @param string|null $message
* @return void
*/
public function extend($rule, $extension, $message = null);
/**
* Register a custom implicit validator extension.
* | {
"filepath": "src/Illuminate/Contracts/Validation/Factory.php",
"language": "php",
"file_size": 1184,
"cut_index": 518,
"middle_length": 229
} |
face Store
{
/**
* Retrieve an item from the cache by key.
*
* @param string $key
* @return mixed
*/
public function get($key);
/**
* Retrieve multiple items from the cache by key.
*
* Items not found in the cache will have a null value.
*
* @param array... | array $values
* @param int $seconds
* @return bool
*/
public function putMany(array $values, $seconds);
/**
* Increment the value of an item in the cache.
*
* @param string $key
* @param mixed $value
| @param mixed $value
* @param int $seconds
* @return bool
*/
public function put($key, $value, $seconds);
/**
* Store multiple items in the cache for a given number of seconds.
*
* @param | {
"filepath": "src/Illuminate/Contracts/Cache/Store.php",
"language": "php",
"file_size": 2083,
"cut_index": 563,
"middle_length": 229
} |
te\Contracts\Events;
interface Dispatcher
{
/**
* Register an event listener with the dispatcher.
*
* @param \Closure|string|array $events
* @param \Closure|string|array|null $listener
* @return void
*/
public function listen($events, $listener = null);
/**
* Determi... | *
* @param string|object $event
* @param mixed $payload
* @return mixed
*/
public function until($event, $payload = []);
/**
* Dispatch an event and call the listeners.
*
* @param string|object $event
| er with the dispatcher.
*
* @param object|string $subscriber
* @return void
*/
public function subscribe($subscriber);
/**
* Dispatch an event until the first non-null response is returned.
| {
"filepath": "src/Illuminate/Contracts/Events/Dispatcher.php",
"language": "php",
"file_size": 1824,
"cut_index": 537,
"middle_length": 229
} |
rt\Traits\Macroable;
use ReflectionClass;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
class Command extends SymfonyCommand
{
... | console command.
*
* @var string
*/
protected $signature;
/**
* The console command name.
*
* @var string
*/
protected $name;
/**
* The console command description.
*
* @var string
* | tsForMissingInput,
Macroable;
/**
* The Laravel application instance.
*
* @var \Illuminate\Contracts\Foundation\Application
*/
protected $laravel;
/**
* The name and signature of the | {
"filepath": "src/Illuminate/Console/Command.php",
"language": "php",
"file_size": 10729,
"cut_index": 921,
"middle_length": 229
} |
/**
* @template TKey of array-key
*
* @template-covariant TValue
*
* @method $this through(callable(TValue): mixed $callback)
*/
interface Paginator
{
/**
* Get the URL for a given page.
*
* @param int $page
* @return string
*/
public function url($page);
/**
* Add a s... | Add all current query string values to the paginator.
*
* @return $this
*/
public function withQueryString();
/**
* The URL for the next page, or null.
*
* @return string|null
*/
public function nextPageUrl() | ue = null);
/**
* Get / set the URL fragment to be appended to URLs.
*
* @param string|null $fragment
* @return $this|string|null
*/
public function fragment($fragment = null);
/**
* | {
"filepath": "src/Illuminate/Contracts/Pagination/Paginator.php",
"language": "php",
"file_size": 2756,
"cut_index": 563,
"middle_length": 229
} |
uminate\Support\Reflector;
use InvalidArgumentException;
use LogicException;
use RuntimeException;
use Throwable;
class CallbackEvent extends Event
{
/**
* The callback to call.
*
* @var string
*/
protected $callback;
/**
* The parameters to pass to the method.
*
* @var ... | * @param string|callable $callback
* @param array $parameters
* @param \DateTimeZone|string|null $timezone
*
* @throws \InvalidArgumentException
*/
public function __construct(EventMutex $mutex, $callback, array $para | thrown when calling the callback, if any.
*
* @var \Throwable|null
*/
protected $exception;
/**
* Create a new event instance.
*
* @param \Illuminate\Console\Scheduling\EventMutex $mutex
| {
"filepath": "src/Illuminate/Console/Scheduling/CallbackEvent.php",
"language": "php",
"file_size": 4925,
"cut_index": 614,
"middle_length": 229
} |
e\Filesystem\Filesystem;
use function Illuminate\Filesystem\join_paths;
abstract class MigrationGeneratorCommand extends Command
{
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* Create a new migration generator command instanc... | ng
*/
abstract protected function migrationStubFile();
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$table = $this->migrationTableName();
if ($this->migrationExi | s;
}
/**
* Get the migration table name.
*
* @return string
*/
abstract protected function migrationTableName();
/**
* Get the path to the migration stub file.
*
* @return stri | {
"filepath": "src/Illuminate/Console/MigrationGeneratorCommand.php",
"language": "php",
"file_size": 2488,
"cut_index": 563,
"middle_length": 229
} |
t\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class Parser
{
/**
* Parse the given console command definition into an array.
*
* @param string $expression
* @return array{string, array{}, array{}}|array{string, \Symfony\Component\Console\Input\InputArgument[], \Symfony\Com... | *
* Extract the name of the command from the expression.
*
* @param string $expression
* @return string
*
* @throws \InvalidArgumentException
*/
protected static function name(string $expression)
{
if (! | ;
if (preg_match_all('/\{\s*(.*?)\s*\}/', $expression, $matches) && count($matches[1])) {
return array_merge([$name], static::parameters($matches[1]));
}
return [$name, [], []];
}
/* | {
"filepath": "src/Illuminate/Console/Parser.php",
"language": "php",
"file_size": 4740,
"cut_index": 614,
"middle_length": 229
} |
* Indicates if the command should be prohibited from running.
*
* @var bool
*/
protected static $prohibitedFromRunning = false;
/**
* Indicate whether the command should be prohibited from running.
*
* @param bool $prohibit
* @return void
*/
public static functio... |
*/
protected function isProhibited(bool $quiet = false)
{
if (! static::$prohibitedFromRunning) {
return false;
}
if (! $quiet) {
$this->components->warn('This command is prohibited from runnin | *
* @param bool $quiet
* @return bool | {
"filepath": "src/Illuminate/Console/Prohibitable.php",
"language": "php",
"file_size": 956,
"cut_index": 582,
"middle_length": 52
} |
t\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface;
trait CallsCommands
{
/**
* Resolve the console command instance for the given command.
*
* @param \Symfony\Component\Console\Command\Command|string $command
* @r... | $this->output);
}
/**
* Call another console command without output.
*
* @param \Symfony\Component\Console\Command\Command|string $command
* @param array $arguments
* @return int
*/
public function callSilent | Component\Console\Command\Command|string $command
* @param array $arguments
* @return int
*/
public function call($command, array $arguments = [])
{
return $this->runCommand($command, $arguments, | {
"filepath": "src/Illuminate/Console/Concerns/CallsCommands.php",
"language": "php",
"file_size": 3223,
"cut_index": 614,
"middle_length": 229
} |
pace Illuminate\Console\Concerns;
use Illuminate\Support\Stringable;
use Symfony\Component\Console\Input\InputOption;
trait CreatesMatchingTest
{
/**
* Add the standard command options for generating matching tests.
*
* @return void
*/
protected function addTestOptions()
{
fore... | * @param string $path
* @return bool
*/
protected function handleTestCreation($path)
{
if (! $this->option('test') && ! $this->option('pest') && ! $this->option('phpunit')) {
return false;
}
return | null,
InputOption::VALUE_NONE,
"Generate an accompanying {$name} test for the {$this->type}"
));
}
}
/**
* Create the matching test case if requested.
*
| {
"filepath": "src/Illuminate/Console/Concerns/CreatesMatchingTest.php",
"language": "php",
"file_size": 1373,
"cut_index": 524,
"middle_length": 229
} |
\Question\ChoiceQuestion;
use Symfony\Component\Console\Question\Question;
trait InteractsWithIO
{
/**
* The console components factory.
*
* @var \Illuminate\Console\View\Components\Factory
*/
protected $components;
/**
* The input interface implementation.
*
* @var \Sym... | /**
* The mapping between human-readable verbosity levels and Symfony's OutputInterface.
*
* @var array<string, \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_*>
*/
protected $verbosityMap = [
'v' => OutputI | otected $output;
/**
* The default verbosity of output commands.
*
* @var \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_*
*/
protected $verbosity = OutputInterface::VERBOSITY_NORMAL;
| {
"filepath": "src/Illuminate/Console/Concerns/InteractsWithIO.php",
"language": "php",
"file_size": 12934,
"cut_index": 921,
"middle_length": 229
} |
rMissingInput as PromptsForMissingInputContract;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use function Laravel\Prompts\text;
trait PromptsF... | tanceof PromptsForMissingInputContract) {
$this->promptForMissingArguments($input, $output);
}
}
/**
* Prompt the user for any missing arguments.
*
* @param \Symfony\Component\Console\Input\InputInterface $inpu | ent\Console\Output\OutputInterface $output
* @return void
*/
protected function interact(InputInterface $input, OutputInterface $output): void
{
parent::interact($input, $output);
if ($this ins | {
"filepath": "src/Illuminate/Console/Concerns/PromptsForMissingInput.php",
"language": "php",
"file_size": 3989,
"cut_index": 614,
"middle_length": 229
} |
e DateTimeInterface;
use Illuminate\Cache\DynamoDbStore;
use Illuminate\Contracts\Cache\Factory as Cache;
use Illuminate\Contracts\Cache\LockProvider;
class CacheSchedulingMutex implements SchedulingMutex, CacheAware
{
/**
* The cache factory implementation.
*
* @var \Illuminate\Contracts\Cache\Fact... | event.
*
* @param \Illuminate\Console\Scheduling\Event $event
* @param \DateTimeInterface $time
* @return bool
*/
public function create(Event $event, DateTimeInterface $time)
{
$mutexName = $event->mutexName() | *
* @param \Illuminate\Contracts\Cache\Factory $cache
*/
public function __construct(Cache $cache)
{
$this->cache = $cache;
}
/**
* Attempt to obtain a scheduling mutex for the given | {
"filepath": "src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php",
"language": "php",
"file_size": 2622,
"cut_index": 563,
"middle_length": 229
} |
nent\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Style\SymfonyStyle;
class OutputStyle extends SymfonyStyle implements NewLineAware
{
/**
* The output instance.
*
* @var \Symfony\Co... | * @deprecated use $newLinesWritten
*/
protected $newLineWritten = false;
/**
* Create a new Console OutputStyle instance.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \Symfony\Component\ | nt for the new line written by the shell after executing a command.
*
* @var int
*/
protected $newLinesWritten = 1;
/**
* If the last output written wrote a new line.
*
* @var bool
*
| {
"filepath": "src/Illuminate/Console/OutputStyle.php",
"language": "php",
"file_size": 4612,
"cut_index": 614,
"middle_length": 229
} |
egistry instance.
*
* @var \Symfony\Component\Console\SignalRegistry\SignalRegistry
*/
protected $registry;
/**
* The signal registry's previous list of handlers.
*
* @var array<int, array<int, callable(int): void>>|null
*/
protected $previousHandlers;
/**
* The... | andlers();
}
/**
* Register a new signal handler.
*
* @param int $signal
* @param callable(int $signal): void $callback
* @return void
*/
public function register($signal, $callback)
{
$this->previ | *
* @param \Symfony\Component\Console\SignalRegistry\SignalRegistry $registry
*/
public function __construct($registry)
{
$this->registry = $registry;
$this->previousHandlers = $this->getH | {
"filepath": "src/Illuminate/Console/Signals.php",
"language": "php",
"file_size": 3519,
"cut_index": 614,
"middle_length": 229
} |
Symfony\Component\Console\Completion\CompletionInput;
use Symfony\Component\Console\Completion\CompletionSuggestions;
use Symfony\Component\Console\Completion\Suggestion;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
trait HasParameters
{
/**
* Specify the... | s) {
if ($arguments instanceof InputArgument) {
$this->getDefinition()->addArgument($arguments);
} else {
$this->addArgument(...$arguments);
}
}
foreach ($this->getOptions | the command and
// set them all on the base command instance. This specifies what can get
// passed into these commands as "parameters" to control the execution.
foreach ($this->getArguments() as $argument | {
"filepath": "src/Illuminate/Console/Concerns/HasParameters.php",
"language": "php",
"file_size": 2207,
"cut_index": 563,
"middle_length": 229
} |
e Illuminate\Cache\DynamoDbStore;
use Illuminate\Contracts\Cache\Factory as Cache;
use Illuminate\Contracts\Cache\LockProvider;
class CacheEventMutex implements EventMutex, CacheAware
{
/**
* The cache repository implementation.
*
* @var \Illuminate\Contracts\Cache\Factory
*/
public $cache;... | luminate\Console\Scheduling\Event $event
* @return bool
*/
public function create(Event $event)
{
if ($this->shouldUseLocks($this->cache->store($this->store)->getStore())) {
return $this->cache->store($this->store)->g | nate\Contracts\Cache\Factory $cache
*/
public function __construct(Cache $cache)
{
$this->cache = $cache;
}
/**
* Attempt to obtain an event mutex for the given event.
*
* @param \Il | {
"filepath": "src/Illuminate/Console/Scheduling/CacheEventMutex.php",
"language": "php",
"file_size": 2972,
"cut_index": 563,
"middle_length": 229
} |
<?php
namespace Illuminate\Contracts\Redis;
use Closure;
interface Connection
{
/**
* Subscribe to a set of given channels for messages.
*
* @param array|string $channels
* @param \Closure $callback
* @return void
*/
public function subscribe($channels, Closure $callback);
... | e($channels, Closure $callback);
/**
* Run a command against the Redis database.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function command($method, array $parameters = []);
}
| tion psubscrib | {
"filepath": "src/Illuminate/Contracts/Redis/Connection.php",
"language": "php",
"file_size": 782,
"cut_index": 512,
"middle_length": 14
} |
e\Console\View\Components\TwoColumnDetail;
use Illuminate\Support\Stringable;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Comp... | $this->ensureEndsWithPunctuation($text);
$text = " <fg=default;options=bold>$text</></>";
$default = $question->getDefault();
if ($question->isMultiline()) {
$text .= sprintf(' (press %s to continue)', 'Windows' == | return void
*/
#[\Override]
protected function writePrompt(OutputInterface $output, Question $question): void
{
$text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());
$text = | {
"filepath": "src/Illuminate/Console/QuestionHelper.php",
"language": "php",
"file_size": 2634,
"cut_index": 563,
"middle_length": 229
} |
use Laravel\Prompts\TextareaPrompt;
use Laravel\Prompts\TextPrompt;
use stdClass;
use Symfony\Component\Console\Input\InputInterface;
trait ConfiguresPrompts
{
/**
* Configure the prompt fallbacks.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @return void
*/
p... | >runningUnitTests());
TextPrompt::fallbackUsing(fn (TextPrompt $prompt) => $this->promptUntilValid(
fn () => $this->components->ask($prompt->label, $prompt->default ?: null) ?? '',
$prompt->required,
$prompt->va | atty(STDIN)) || $this->laravel->runningUnitTests());
Prompt::validateUsing(fn (Prompt $prompt) => $this->validatePrompt($prompt->value(), $prompt->validate));
Prompt::fallbackWhen(windows_os() || $this->laravel- | {
"filepath": "src/Illuminate/Console/Concerns/ConfiguresPrompts.php",
"language": "php",
"file_size": 9385,
"cut_index": 921,
"middle_length": 229
} |
e Illuminate\Console\Application;
use Illuminate\Support\ProcessUtils;
class CommandBuilder
{
/**
* Build the command for the given event.
*
* @param \Illuminate\Console\Scheduling\Event $event
* @return string
*/
public function buildCommand(Event $event)
{
if ($event->r... | peArgument($event->output);
return laravel_cloud()
? $this->ensureCorrectUser($event, $event->command.' 2>&1 | tee '.($event->shouldAppendOutput ? '-a ' : '').$output)
: $this->ensureCorrectUser($event, $event->command.($ev | the event in the foreground.
*
* @param \Illuminate\Console\Scheduling\Event $event
* @return string
*/
protected function buildForegroundCommand(Event $event)
{
$output = ProcessUtils::esca | {
"filepath": "src/Illuminate/Console/Scheduling/CommandBuilder.php",
"language": "php",
"file_size": 2374,
"cut_index": 563,
"middle_length": 229
} |
pace Illuminate\Console\Concerns;
use Illuminate\Console\Signals;
use Illuminate\Support\Collection;
trait InteractsWithSignals
{
/**
* The signal registrar instance.
*
* @var \Illuminate\Console\Signals|null
*/
protected $signals;
/**
* Define a callback to be run when the given... | getApplication()->getSignalRegistry(),
);
Collection::wrap(value($signals))
->each(fn ($signal) => $this->signals->register($signal, $callback));
});
}
/**
* Untrap signal handlers set within t | $callback
* @return void
*/
public function trap($signals, $callback)
{
Signals::whenAvailable(function () use ($signals, $callback) {
$this->signals ??= new Signals(
$this-> | {
"filepath": "src/Illuminate/Console/Concerns/InteractsWithSignals.php",
"language": "php",
"file_size": 1262,
"cut_index": 524,
"middle_length": 229
} |
timeException;
class Env
{
/**
* Indicates if the putenv adapter is enabled.
*
* @var bool
*/
protected static $putenv = true;
/**
* The environment repository instance.
*
* @var \Dotenv\Repository\RepositoryInterface|null
*/
protected static $repository;
/... | rn void
*/
public static function disablePutenv()
{
static::$putenv = false;
static::$repository = null;
}
/**
* Register a custom adapter creator Closure.
*/
public static function extend(Closure $callba | adapter.
*
* @return void
*/
public static function enablePutenv()
{
static::$putenv = true;
static::$repository = null;
}
/**
* Disable the putenv adapter.
*
* @retu | {
"filepath": "src/Illuminate/Support/Env.php",
"language": "php",
"file_size": 8543,
"cut_index": 716,
"middle_length": 229
} |
;
use Illuminate\Console\OutputStyle;
use Illuminate\Console\QuestionHelper;
use ReflectionClass;
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
use function Termwind\render;
use function Termwind\renderUsing;
abstract class Component
{
/**
* The output style implementation.
*
* @var ... | }
/**
* Renders the given view.
*
* @param string $view
* @param \Illuminate\Contracts\Support\Arrayable|array $data
* @param int $verbosity
* @return void
*/
protected function renderView($view, $data, $ve | protected $mutators;
/**
* Creates a new component instance.
*
* @param \Illuminate\Console\OutputStyle $output
*/
public function __construct($output)
{
$this->output = $output;
| {
"filepath": "src/Illuminate/Console/View/Components/Component.php",
"language": "php",
"file_size": 2957,
"cut_index": 563,
"middle_length": 229
} |
te\Console\View\Components;
use Illuminate\Console\Contracts\NewLineAware;
use Symfony\Component\Console\Output\OutputInterface;
class Line extends Component
{
/**
* The possible line styles.
*
* @var array<string, array<string, string>>
*/
protected static $styles = [
'info' => [
... | 'red',
'fgColor' => 'white',
'title' => 'error',
],
];
/**
* Renders the component using the given arguments.
*
* @param string $style
* @param string $string
* @param int $verbosity
| white',
'title' => 'success',
],
'warn' => [
'bgColor' => 'yellow',
'fgColor' => 'black',
'title' => 'warn',
],
'error' => [
'bgColor' => | {
"filepath": "src/Illuminate/Console/View/Components/Line.php",
"language": "php",
"file_size": 1620,
"cut_index": 537,
"middle_length": 229
} |
;
use Illuminate\Console\View\TaskResult;
use Illuminate\Support\InteractsWithTime;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
use function Termwind\terminal;
class Task extends Component
{
use InteractsWithTime;
/**
* Renders the component using the given arguments.
*
... | ureNoPunctuation::class,
Mutators\EnsureRelativePaths::class,
]);
$descriptionWidth = mb_strlen(preg_replace("/\<[\w=#\/\;,:.&,%?]+\>|\\e\[\d+m/", '$1', $description) ?? '');
$this->output->write(" $description ", fal | render($description, $task = null, $verbosity = OutputInterface::VERBOSITY_NORMAL)
{
$description = $this->mutate($description, [
Mutators\EnsureDynamicContentIsHighlighted::class,
Mutators\Ens | {
"filepath": "src/Illuminate/Console/View/Components/Task.php",
"language": "php",
"file_size": 2158,
"cut_index": 563,
"middle_length": 229
} |
rderWhenProxy
{
/**
* The target being conditionally operated on.
*
* @var mixed
*/
protected $target;
/**
* The condition for proxying.
*
* @var bool
*/
protected $condition;
/**
* Indicates whether the proxy has a condition.
*
* @var bool
... | @param bool $condition
* @return $this
*/
public function condition($condition)
{
[$this->condition, $this->hasCondition] = [$condition, true];
return $this;
}
/**
* Indicate that the condition should be n | * Create a new proxy instance.
*
* @param mixed $target
*/
public function __construct($target)
{
$this->target = $target;
}
/**
* Set the condition on the proxy.
*
* | {
"filepath": "src/Illuminate/Conditionable/HigherOrderWhenProxy.php",
"language": "php",
"file_size": 2229,
"cut_index": 563,
"middle_length": 229
} |
sFrequencies, ReflectsClosures, Tappable;
/**
* The command string.
*
* @var string|null
*/
public $command;
/**
* The location that output should be sent to.
*
* @var string
*/
public $output = '/dev/null';
/**
* Indicates whether output should be app... |
*
* @var \Illuminate\Console\Scheduling\EventMutex
*/
public $mutex;
/**
* The mutex name resolver callback.
*
* @var \Closure|null
*/
public $mutexNameResolver;
/**
* The last time the event was c | protected $beforeCallbacks = [];
/**
* The array of callbacks to be run after the event is finished.
*
* @var array
*/
protected $afterCallbacks = [];
/**
* The event mutex implementation. | {
"filepath": "src/Illuminate/Console/Scheduling/Event.php",
"language": "php",
"file_size": 24372,
"cut_index": 1331,
"middle_length": 229
} |
return $this;
}
/**
* Schedule the event to run between start and end time.
*
* @param string $startTime
* @param string $endTime
* @return $this
*/
public function between($startTime, $endTime)
{
return $this->when($this->inTimeInterval($startTime, $... | ram string $startTime
* @param string $endTime
* @return \Closure
*/
private function inTimeInterval($startTime, $endTime)
{
[$now, $startTime, $endTime] = [
Carbon::now($this->timezone),
Carbon::p |
public function unlessBetween($startTime, $endTime)
{
return $this->skip($this->inTimeInterval($startTime, $endTime));
}
/**
* Schedule the event to run between start and end time.
*
* @pa | {
"filepath": "src/Illuminate/Console/Scheduling/ManagesFrequencies.php",
"language": "php",
"file_size": 15467,
"cut_index": 921,
"middle_length": 229
} |
BeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\CallQueuedClosure;
use Illuminate\Support\Collection;
use Illuminate\Support\ProcessUtils;
use Illuminate\Support\Traits\Macroable;
use RuntimeException;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use function Illuminate\S... | e\Scheduling\Event[]
*/
protected $events = [];
/**
* The event mutex implementation.
*
* @var \Illuminate\Console\Scheduling\EventMutex
*/
protected $eventMutex;
/**
* The scheduling mutex implementation.
| const MONDAY = 1;
const TUESDAY = 2;
const WEDNESDAY = 3;
const THURSDAY = 4;
const FRIDAY = 5;
const SATURDAY = 6;
/**
* All of the events on the schedule.
*
* @var \Illuminate\Consol | {
"filepath": "src/Illuminate/Console/Scheduling/Schedule.php",
"language": "php",
"file_size": 15046,
"cut_index": 921,
"middle_length": 229
} |
pace Illuminate\Console\Scheduling;
use Illuminate\Console\Command;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Support\Facades\Date;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'schedule:interrupt')]
class ScheduleInterruptCommand extends Command
{
/**
* The c... | e interrupt command.
*
* @param \Illuminate\Contracts\Cache\Repository $cache
*/
public function __construct(Cache $cache)
{
parent::__construct();
$this->cache = $cache;
}
/**
* Execute the console c | ted $description = 'Interrupt the current schedule run';
/**
* The cache store implementation.
*
* @var \Illuminate\Contracts\Cache\Repository
*/
protected $cache;
/**
* Create a new schedul | {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleInterruptCommand.php",
"language": "php",
"file_size": 1266,
"cut_index": 524,
"middle_length": 229
} |
namespace Illuminate\Console\Scheduling;
use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'schedule:clear-cache')]
class ScheduleClearCacheCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'sc... | foreach ($schedule->events() as $event) {
if ($event->mutex->exists($event)) {
$this->components->info(sprintf('Deleting mutex for [%s]', $event->command));
$event->mutex->forget($event);
$ | /**
* Execute the console command.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
public function handle(Schedule $schedule)
{
$mutexCleared = false;
| {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php",
"language": "php",
"file_size": 1165,
"cut_index": 518,
"middle_length": 229
} |
Illuminate\Console\Scheduling;
use Illuminate\Console\Command;
use Illuminate\Console\Events\SchedulePaused;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Events\Dispatcher;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'schedule:pause')]
class SchedulePauseComman... | function handle(Cache $cache, Dispatcher $dispatcher)
{
$cache->forever('illuminate:schedule:paused', true);
$dispatcher->dispatch(new SchedulePaused);
$this->components->info('Scheduled task processing has been paused.');
| mmand.
*
* @return int
*/
public | {
"filepath": "src/Illuminate/Console/Scheduling/SchedulePauseCommand.php",
"language": "php",
"file_size": 861,
"cut_index": 529,
"middle_length": 52
} |
e\Events\ScheduledTaskFinished;
use Illuminate\Console\Events\ScheduledTaskSkipped;
use Illuminate\Console\Events\ScheduledTaskStarting;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Carbon;
use Ill... |
/**
* The console command description.
*
* @var string
*/
protected $description = 'Run the scheduled commands';
/**
* The schedule instance.
*
* @var \Illuminate\Console\Scheduling\Schedule
*/
pro | ds Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'schedule:run {--whisper : Do not output message indicating that no jobs were ready to run}'; | {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleRunCommand.php",
"language": "php",
"file_size": 8826,
"cut_index": 716,
"middle_length": 229
} |
e Illuminate\Console\Application;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Illuminate\Support\ProcessUtils;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Process;
#[AsCommand(name: 'schedule:work')]
class... | ring
*/
protected $description = 'Start the schedule worker';
/**
* Execute the console command.
*
* @return never
*/
public function handle()
{
$this->components->info(
'Running scheduled tasks | output-file= : The file to direct <info>schedule:run</info> output to}
{--whisper : Do not output message indicating that no jobs were ready to run}';
/**
* The console command description.
*
* @var st | {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php",
"language": "php",
"file_size": 2403,
"cut_index": 563,
"middle_length": 229
} |
;
use InvalidArgumentException;
/**
* @method void alert(string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method mixed ask(string $question, string $default = null, bool $multiline = false)
* @method mixed askWithCompletion(string $question, array|callable $c... | Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void success(string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void error(string $string, int $verbosity = \Symfony\Component\Consol | $question, array $choices, $default = null, int $attempts = null, bool $multiple = false)
* @method bool confirm(string $question, bool $default = false)
* @method void info(string $string, int $verbosity = \Symfony\Component\ | {
"filepath": "src/Illuminate/Console/View/Components/Factory.php",
"language": "php",
"file_size": 2675,
"cut_index": 563,
"middle_length": 229
} |
onent\Console\Output\OutputInterface;
class TwoColumnDetail extends Component
{
/**
* Renders the component using the given arguments.
*
* @param string $first
* @param string|null $second
* @param int $verbosity
* @return void
*/
public function render($first, $second ... | lativePaths::class,
]);
$second = $this->mutate($second, [
Mutators\EnsureDynamicContentIsHighlighted::class,
Mutators\EnsureRelativePaths::class,
]);
$this->renderView('two-column-detail', [
| eNoPunctuation::class,
Mutators\EnsureRe | {
"filepath": "src/Illuminate/Console/View/Components/TwoColumnDetail.php",
"language": "php",
"file_size": 980,
"cut_index": 582,
"middle_length": 52
} |
ng
*/
public $expression = '* * * * *';
/**
* How often to repeat the event during a minute.
*
* @var int|null
*/
public $repeatSeconds = null;
/**
* The timezone the date should be evaluated on.
*
* @var \DateTimeZone|string
*/
public $timezone;
/... | mmand should run even when the scheduler is paused.
*
* @var bool
*/
public $evenWhenPaused = false;
/**
* Indicates if the command should not overlap itself.
*
* @var bool
*/
public $withoutOverlapping = fal | array
*/
public $environments = [];
/**
* Indicates if the command should run in maintenance mode.
*
* @var bool
*/
public $evenInMaintenanceMode = false;
/**
* Indicates if the co | {
"filepath": "src/Illuminate/Console/Scheduling/ManagesAttributes.php",
"language": "php",
"file_size": 5935,
"cut_index": 716,
"middle_length": 229
} |
pace Illuminate\Console\Scheduling;
use Illuminate\Console\Command;
use Illuminate\Console\Events\ScheduledBackgroundTaskFinished;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Collection;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'schedule:finish')]
class ScheduleFinis... | * @var bool
*/
protected $hidden = true;
/**
* Execute the console command.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
public function handle(Schedule $schedule)
{
| mmand description.
*
* @var string
*/
protected $description = 'Handle the completion of a scheduled command';
/**
* Indicates whether the command should be shown in the Artisan command list.
*
| {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php",
"language": "php",
"file_size": 1383,
"cut_index": 524,
"middle_length": 229
} |
<?php
namespace Illuminate\Console\Scheduling;
use Illuminate\Console\Command;
use Illuminate\Console\Events\ScheduleResumed;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Events\Dispatcher;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'schedule:resume', aliases... | /
public function handle(Cache $cache, Dispatcher $dispatcher)
{
$cache->forget('illuminate:schedule:paused');
$dispatcher->dispatch(new ScheduleResumed);
$this->components->info('Scheduled task processing has resumed.');
| he schedule';
/**
* The console command name aliases.
*
* @var list<string>
*/
protected $aliases = ['schedule:continue'];
/**
* Execute the console command.
*
* @return int
* | {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleResumeCommand.php",
"language": "php",
"file_size": 1024,
"cut_index": 512,
"middle_length": 229
} |
pace Illuminate\Console\View\Components;
use Symfony\Component\Console\Question\ChoiceQuestion;
class Choice extends Component
{
/**
* Renders the component using the given arguments.
*
* @param string $question
* @param array<array-key, string> $choices
* @param mixed $default
... | ->setMultiselect($multiple)
),
);
}
/**
* Get a ChoiceQuestion instance that handles array keys like Prompts.
*
* @param string $question
* @param array $choices
* @param mixed $default
|
{
return $this->usingQuestionHelper(
fn () => $this->output->askQuestion(
$this->getChoiceQuestion($question, $choices, $default)
->setMaxAttempts($attempts)
| {
"filepath": "src/Illuminate/Console/View/Components/Choice.php",
"language": "php",
"file_size": 1404,
"cut_index": 524,
"middle_length": 229
} |
t cron expression to the display timezone.
*
* Returns one or more expressions when values straddle a day boundary.
*
* @param \Illuminate\Console\Scheduling\Event $event
* @param \DateTimeZone $timezone
* @return array<string>
*/
public static function forEvent(Event $event, ... | atic::shiftAndGroup($segments[0], $minuteOffset, 60);
$expressions = [];
foreach ($minuteGroups as $minuteCarry => $minuteValues) {
$hourGroups = static::shiftAndGroup($segments[1], $hourOffset + $minuteCarry, 24);
| $eventTimezone, $timezone
);
if ($totalOffsetMinutes === 0) {
return [$event->expression];
}
$segments = preg_split("/\s+/", $event->expression);
$minuteGroups = st | {
"filepath": "src/Illuminate/Console/Scheduling/CronExpressionTimezoneConverter.php",
"language": "php",
"file_size": 5141,
"cut_index": 716,
"middle_length": 229
} |
*/
class PendingEventAttributes
{
use ManagesAttributes, ManagesFrequencies;
/**
* Event lifecycle and output methods that should be deferred and replayed on each event in the group.
*
* @var array<int, string>
*/
public const DEFERRED_EVENT_METHODS = [
'before',
'afte... | 'emailWrittenOutputTo',
'emailOutputOnFailure',
];
/**
* The recorded macro and deferred method calls to replay on each event.
*
* @var array<int, array{string, array}>
*/
protected array $macros = [];
/**
| f',
'thenPing',
'thenPingIf',
'pingOnSuccess',
'pingOnSuccessIf',
'pingOnFailure',
'pingOnFailureIf',
'sendOutputTo',
'appendOutputTo',
'emailOutputTo',
| {
"filepath": "src/Illuminate/Console/Scheduling/PendingEventAttributes.php",
"language": "php",
"file_size": 3760,
"cut_index": 614,
"middle_length": 229
} |
nsole\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use function Laravel\Prompts\select;
#[AsCommand(name: 'schedule:test')]
class ScheduleTestCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'schedule:test {--name= : The nam... |
$commands = $schedule->events();
$commandNames = [];
foreach ($commands as $command) {
$commandNames[] = $command->command ?? $command->getSummaryForDisplay();
}
if (empty($commandNames)) {
| Execute the console command.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
public function handle(Schedule $schedule)
{
$phpBinary = Application::phpBinary(); | {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleTestCommand.php",
"language": "php",
"file_size": 3466,
"cut_index": 614,
"middle_length": 229
} |
ScheduleListCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'schedule:list
{--timezone= : The timezone that times should be displayed in}
{--environment=* : Display the tasks scheduled to run on this environment}
{-... | e console command.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*
* @throws \Exception
*/
public function handle(Schedule $schedule)
{
$environments = Arr::wrap($this->option('e | */
protected $description = 'List all scheduled tasks';
/**
* The terminal width resolver callback.
*
* @var \Closure|null
*/
protected static $terminalWidthResolver;
/**
* Execute th | {
"filepath": "src/Illuminate/Console/Scheduling/ScheduleListCommand.php",
"language": "php",
"file_size": 12477,
"cut_index": 921,
"middle_length": 229
} |
/**
* The default memory cost factor.
*
* @var int
*/
protected $memory = 1024;
/**
* The default time cost factor.
*
* @var int
*/
protected $time = 2;
/**
* The default threads factor.
*
* @var int
*/
protected $threads = 2;
/**
... | is->threads($options);
$this->verifyAlgorithm = $options['verify'] ?? $this->verifyAlgorithm;
}
/**
* Hash the given value.
*
* @param string $value
* @param array $options
* @return string
*
* @throw | array $options
*/
public function __construct(array $options = [])
{
$this->time = $options['time'] ?? $this->time;
$this->memory = $options['memory'] ?? $this->memory;
$this->threads = $th | {
"filepath": "src/Illuminate/Hashing/ArgonHasher.php",
"language": "php",
"file_size": 5891,
"cut_index": 716,
"middle_length": 229
} |
Manager;
/**
* @mixin \Illuminate\Contracts\Hashing\Hasher
*/
class HashManager extends Manager implements Hasher
{
/**
* Create an instance of the Bcrypt hash Driver.
*
* @return \Illuminate\Hashing\BcryptHasher
*/
public function createBcryptDriver()
{
return new BcryptHashe... | sher
*/
public function createArgon2idDriver()
{
return new Argon2IdHasher($this->config->get('hashing.argon') ?? []);
}
/**
* Get information about the given hashed value.
*
* @param string $hashedValue
| ction createArgonDriver()
{
return new ArgonHasher($this->config->get('hashing.argon') ?? []);
}
/**
* Create an instance of the Argon2id hash Driver.
*
* @return \Illuminate\Hashing\Argon2IdHa | {
"filepath": "src/Illuminate/Hashing/HashManager.php",
"language": "php",
"file_size": 3075,
"cut_index": 614,
"middle_length": 229
} |
hp
namespace Illuminate\Concurrency;
use Carbon\CarbonInterval;
use Closure;
use Illuminate\Contracts\Concurrency\Driver;
use Illuminate\Support\Arr;
use Illuminate\Support\Defer\DeferredCallback;
use Spatie\Fork\Fork;
use function Illuminate\Support\defer;
class ForkDriver implements Driver
{
/**
* Run th... | $results = Fork::new()->run(...$values);
ksort($results);
return array_combine($keys, $results);
}
/**
* Start the given tasks in the background after the current task has finished.
*/
public function defer(Clos | s = Arr::wrap($tasks);
$keys = array_keys($tasks);
$values = array_values($tasks);
/** @phpstan-ignore class.notFound (spatie/fork is not installed as it is practically incompatible with Windows) */
| {
"filepath": "src/Illuminate/Concurrency/ForkDriver.php",
"language": "php",
"file_size": 1101,
"cut_index": 515,
"middle_length": 229
} |
Illuminate\Concurrency;
use Carbon\CarbonInterval;
use Closure;
use Illuminate\Contracts\Concurrency\Driver;
use Illuminate\Support\Collection;
use Illuminate\Support\Defer\DeferredCallback;
use function Illuminate\Support\defer;
class SyncDriver implements Driver
{
/**
* Run the given tasks concurrently an... | ();
}
/**
* Start the given tasks in the background after the current task has finished.
*/
public function defer(Closure|array $tasks): DeferredCallback
{
return defer(fn () => Collection::wrap($tasks)->each(fn ($task) = | ap(
fn ($task) => $task()
)->all | {
"filepath": "src/Illuminate/Concurrency/SyncDriver.php",
"language": "php",
"file_size": 858,
"cut_index": 529,
"middle_length": 52
} |
imeException;
use Throwable;
use function Illuminate\Support\enum_value;
/**
* @mixin \Illuminate\Log\Logger
*/
class LogManager implements LoggerInterface
{
use ParsesLogConfiguration, RebindsCallbacksToSelf;
/**
* The application instance.
*
* @var \Illuminate\Contracts\Foundation\Applicat... | ndard date format to use when writing logs.
*
* @var string
*/
protected $dateFormat = 'Y-m-d H:i:s';
/**
* Create a new Log manager instance.
*
* @param \Illuminate\Contracts\Foundation\Application $app
*/
| s and stacks.
*
* @var array
*/
protected $sharedContext = [];
/**
* The registered custom driver creators.
*
* @var array
*/
protected $customCreators = [];
/**
* The sta | {
"filepath": "src/Illuminate/Log/LogManager.php",
"language": "php",
"file_size": 22047,
"cut_index": 1331,
"middle_length": 229
} |
ng logger implementation.
*
* @var \Psr\Log\LoggerInterface
*/
protected $logger;
/**
* The event dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher|null
*/
protected $dispatcher;
/**
* Any context to be added to logs.
*
* @var array... | n emergency message to the logs.
*
* @param \Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\Support\Jsonable|\Illuminate\Support\Stringable|array|string $message
* @param array $context
* @return void
*/
publi | atcher|null $dispatcher
*/
public function __construct(LoggerInterface $logger, ?Dispatcher $dispatcher = null)
{
$this->logger = $logger;
$this->dispatcher = $dispatcher;
}
/**
* Log a | {
"filepath": "src/Illuminate/Log/Logger.php",
"language": "php",
"file_size": 9401,
"cut_index": 921,
"middle_length": 229
} |
te\Log\Context;
use Illuminate\Contracts\Log\ContextLogProcessor as ContextLogProcessorContract;
use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Queue\Queue;
use Illuminate\Support\Env;
use Illuminate\Support\Facades\Context;
use Illuminate\Support\ServiceProvider;
class ContextServiceProvider extends Servi... | decode($context, associative: true)) {
$repository->hydrate($context);
}
});
}
$this->app->bind(ContextLogProcessorContract::class, fn () => new ContextLogProcessor());
}
/**
* | this->app->runningInConsole()) {
$this->app->resolving(Repository::class, function (Repository $repository) {
$context = Env::get('__LARAVEL_CONTEXT');
if ($context && $context = json_ | {
"filepath": "src/Illuminate/Log/Context/ContextServiceProvider.php",
"language": "php",
"file_size": 1700,
"cut_index": 537,
"middle_length": 229
} |
te\Log\Formatters;
use Illuminate\Container\Container;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Monolog\Formatter\JsonFormatter as MonologJsonFormatter;
use Throwable;
class JsonFormatter extends MonologJsonFormatter
{
#[\Override]
protected function normalizeException(Throwable $e, int $depth = 0... | , 'buildContextForException')
&& is_array($normalizedHandlerExceptionContext = $this->normalize($handler->buildContextForException($e), $depth + 1))
) {
$response = array_merge(
$normalizedHan | able) {
return array_merge($this->getExceptionContext($e, $depth), $response);
}
if ((! method_exists($handler, 'isReporting')) || ! $handler->isReporting($e)) {
if (method_exists($handler | {
"filepath": "src/Illuminate/Log/Formatters/JsonFormatter.php",
"language": "php",
"file_size": 1813,
"cut_index": 537,
"middle_length": 229
} |
use Illuminate\Support\Traits\Macroable;
class Benchmark
{
use Macroable;
/**
* Measure a callable or array of callables over the given number of iterations.
*
* @param \Closure|array<callable> $benchmarkables
* @param int $iterations
* @return array<float|int|null>|float
*/
... | hrtime(true) - $start) / 1_000_000;
})->average();
})->when(
$benchmarkables instanceof Closure,
fn ($c) => $c->first(),
fn ($c) => $c->all(),
);
}
/**
* Measure a callable once | tions) {
return Collection::range(1, $iterations)->map(function () use ($callback) {
gc_collect_cycles();
$start = hrtime(true);
$callback();
return ( | {
"filepath": "src/Illuminate/Support/Benchmark.php",
"language": "php",
"file_size": 2102,
"cut_index": 563,
"middle_length": 229
} |
rbon as BaseCarbon;
use Carbon\CarbonImmutable as BaseCarbonImmutable;
use Illuminate\Support\Traits\Conditionable;
use Illuminate\Support\Traits\Dumpable;
use Ramsey\Uuid\Uuid;
use Symfony\Component\Uid\Ulid;
class Carbon extends BaseCarbon
{
use Conditionable, Dumpable;
/**
* {@inheritdoc}
*/
... | Uuid::fromString($id);
}
return static::createFromInterface($id->getDateTime());
}
/**
* Get the current date / time plus a given amount of time.
*/
public function plus(
int $years = 0,
int $months = | Carbon instance from a given ordered UUID or ULID.
*/
public static function createFromId(Uuid|Ulid|string $id): static
{
if (is_string($id)) {
$id = Ulid::isValid($id) ? Ulid::fromString($id) : | {
"filepath": "src/Illuminate/Support/Carbon.php",
"language": "php",
"file_size": 2162,
"cut_index": 563,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.