Plentymarkets interface documentation
Console
Commands
GenerateShopBuilderPresetsEvent
Event
Namespace
Plenty\Console\Commands
Methods
public getPluginSet():Plenty\Modules\Plugin\PluginSet\Models\PluginSet
Return type: PluginSet
Get the plugin set which have been built
Models
Item
ItemImageSettings
Configuration of item images
Namespace
Plenty\Legacy\Models\Item
Name | Type | Description |
---|---|---|
cdnUrl |
||
maxAge |
||
imageExportPos |
||
defaultExport |
||
ftpImport |
||
ftpImportMatching |
||
neckermannExport |
||
attributeImageWidth |
||
attributeImageHeight |
||
name |
||
placeholder |
||
sizes |
||
aliases |
||
legacyPreviousSizes |
Methods
public toArray()
Returns this model as an array.
Item
SalesPrice
SalesPriceSearchRepository
foo
Namespace
Plenty\Legacy\Repositories\Item\SalesPrice
Methods
public search($request):Plenty\Modules\Item\SalesPrice\Models\SalesPriceSearchResponse
Return type: SalesPriceSearchResponse
Name |
Type |
Description |
|
public searchAll($request):array
Name |
Type |
Description |
|
Variation
DetectSalesPriceService
To be written…
Namespace
Plenty\Legacy\Services\Item\Variation
Methods
public getQuantity():void
public setQuantity($quantity):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getCurrency():void
public setCurrency($currency):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getPlentyId():void
public setPlentyId($plentyId):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getOrderReferrer():void
public setOrderReferrer($orderReferrer):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getCustomerClass():void
public setCustomerClass($customerClass):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getType():void
public setType($type):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getCountryOfDelivery():void
public setCountryOfDelivery($countryOfDelivery):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getAccountType():void
public setAccountType($accountType):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public getAccountId():void
public setAccountId($accountId):Plenty\Legacy\Services\Item\Variation\DetectSalesPriceService
Return type: DetectSalesPriceService
Name |
Type |
Description |
|
public detect():void
Log
Contracts
LoggerContract
The contract for the logger.
Namespace
Plenty\Log\Contracts
Methods
public report($code, $additionalInfo = null):void
Report information.
Name |
Type |
Description |
|
||
|
public debug($code, $additionalInfo = null):void
Detailed debug information.
Name |
Type |
Description |
|
||
|
public info($code, $additionalInfo = null):void
Interesting events.
Name |
Type |
Description |
|
||
|
public notice($code, $additionalInfo = null):void
Normal but significant events.
Name |
Type |
Description |
|
||
|
public warning($code, $additionalInfo = null):void
Exceptional occurrences that are not errors.
Name |
Type |
Description |
|
||
|
public error($code, $additionalInfo = null):void
Runtime errors that do not require immediate action but should typically be logged and monitored.
Name |
Type |
Description |
|
||
|
public critical($code, $additionalInfo = null):void
Critical conditions.
Name |
Type |
Description |
|
||
|
public alert($code, $additionalInfo = null):void
Action must be taken immediately.
Name |
Type |
Description |
|
||
|
public emergency($code, $additionalInfo = null):void
System is unusable.
Name |
Type |
Description |
|
||
|
public logException($exception, $traceDepth = 3):void
Log exceptions.
Name |
Type |
Description |
|
||
|
The depth of the stack trace to be logged. Default is 3. |
public setReferenceType($referenceType):Plenty\Log\Contracts\LoggerContract
Return type: LoggerContract
The reference type.
Name |
Type |
Description |
|
public setReferenceValue($referenceValue):Plenty\Log\Contracts\LoggerContract
Return type: LoggerContract
The reference value.
Name |
Type |
Description |
|
public addReference($referenceType, $referenceValue):Plenty\Log\Contracts\LoggerContract
Return type: LoggerContract
Add reference.
Name |
Type |
Description |
|
||
|
public addPlaceholder($placeholderName, $placeholderValue):Plenty\Log\Contracts\LoggerContract
Return type: LoggerContract
Add code placeholder.
Name |
Type |
Description |
|
||
|
Models
Log
The log entity model
Namespace
Plenty\Log\Models
Name | Type | Description |
---|---|---|
id |
The ID of the log entry |
|
createdAt |
The date when the log entry was created |
|
integration |
The integration key used for the log entry. Used as a first level allocation. |
|
identifier |
The identifier used for the log entry. Used as a second level allocation. |
|
code |
The code for this current log entry. For log entries with level "debug", "info", "notice", "warning" and "report" this needs to have an translation in order to be stored. |
|
referenceType |
Deprecated field, see the <code>references</code> field instead. |
|
referenceValue |
Deprecated field, see the <code>references</code> field instead. |
|
level |
The level this current log entry belongs to. Notice! When storing log entries with level "report" the entries will actually be stored as level "info". The difference between "report" and "info" is that log entries with level "report" do not need prior activation. |
|
additionalInfo |
Additional information that need to also be stored. Can be an int, string or object. |
|
callerFunction |
||
callerLine |
||
references |
All the reference types and values correlated with this log entry. |
Methods
public toArray()
Returns this model as an array.
Search
Contracts
LogRepositoryContract
Contract for logs.
Namespace
Plenty\Log\Search\Contracts
Methods
public search($page = 1, $itemsPerPage = 50, $filters = [], $sortBy = "createdAt", $sortOrder = "desc", $with = []):Plenty\Repositories\Models\FilteredPaginatedResult
Return type: FilteredPaginatedResult
Search logs with the given filters.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public get($id):Plenty\Log\Models\Log
Plenty
Plugin
Application
The main application
Namespace
Plenty\Plugin
Methods
public register($providerClassName):void
Register a service provider with the application.
Name |
Type |
Description |
|
the classname with namespace of the provider |
public bind($abstract, $concrete = null, $shared = false):void
Register a binding with the container.
Name |
Type |
Description |
|
||
|
||
|
public singleton($abstract, $concrete = null):void
Register a shared binding in the container.
Name |
Type |
Description |
|
||
|
public make($abstract, $parameters = []):void
Name |
Type |
Description |
|
||
|
public makeWith($abstract, $parameters = []):void
Name |
Type |
Description |
|
||
|
public abort($code, $message = "", $headers = []):void
Throw an HttpException with the given data.
Name |
Type |
Description |
|
||
|
||
|
public getWebstoreId():int
Returns current webstoreId
public getPlentyId():int
public isAdminPreview():bool
public isTemplateSafeMode():bool
public isBackendRequest():bool
public getPluginSetId():int
public getUrlPath($pluginName = ""):string
Returns the URL to the plugin resources
Name |
Type |
Description |
|
public getCdnDomain():string
Returns the URL from the cdn
public getPlentyHash():string
Returns the plentyHash
CachingRepository
caching repository
Namespace
Plenty\Plugin
Methods
public has($key):bool
Determine if an item exists in the cache.
Name |
Type |
Description |
|
public get($key, $default = null):void
Retrieve an item from the cache by key.
Name |
Type |
Description |
|
||
|
public many($keys):array
Retrieve multiple items from the cache by key.
Name |
Type |
Description |
|
public pull($key, $default = null):void
Retrieve an item from the cache and delete it.
Name |
Type |
Description |
|
||
|
public put($key, $value, $minutes = null):void
Store an item in the cache.
Name |
Type |
Description |
|
||
|
||
|
public putMany($values, $minutes):void
Store multiple items in the cache for a given number of minutes.
Name |
Type |
Description |
|
||
|
public add($key, $value, $minutes):bool
Store an item in the cache if the key does not exist.
Name |
Type |
Description |
|
||
|
||
|
public remember($key, $minutes, $callback):void
Get an item from the cache, or store the default value.
Name |
Type |
Description |
|
||
|
||
|
public forget($key):bool
Remove an item from the cache.
Name |
Type |
Description |
|
public deleteByPrefix($prefix):void
Name |
Type |
Description |
|
public static getPrefix():string
ConfigRepository
configuration repository
Namespace
Plenty\Plugin
Methods
public has($key):bool
Determine if the given configuration value exists.
Name |
Type |
Description |
|
public get($key, $default = null):mixed
Get the specified configuration value.
Name |
Type |
Description |
|
||
|
public set($key, $value = null):void
Set a given configuration value.
Name |
Type |
Description |
|
||
|
public prepend($key, $value):void
Prepend a value onto an array configuration value.
Name |
Type |
Description |
|
||
|
public push($key, $value):void
Push a value onto an array configuration value.
Name |
Type |
Description |
|
||
|
public static getPrefix():string
Controller
Controller
Namespace
Plenty\Plugin
Methods
public __construct():void
Controller constructor.
DataExchangeServiceProvider
Data Exchange service provider
Namespace
Plenty\Plugin
Methods
public getApplication():Plenty\Plugin\Application
Return type: Application
public getEventDispatcher():Plenty\Plugin\Events\Dispatcher
Return type: Dispatcher
RouteServiceProvider
Route service provider
Namespace
Plenty\Plugin
Methods
public getApplication():Plenty\Plugin\Application
Return type: Application
public getEventDispatcher():Plenty\Plugin\Events\Dispatcher
Return type: Dispatcher
ServiceProvider
Service provider for plugins
Namespace
Plenty\Plugin
Methods
public addGlobalMiddleware($middleware):void
Add a new middleware to end of the stack if it does not already exist.
Name |
Type |
Description |
|
public getApplication():Plenty\Plugin\Application
Return type: Application
public getEventDispatcher():Plenty\Plugin\Events\Dispatcher
Return type: Dispatcher
SessionRepository
session repository
Namespace
Plenty\Plugin
Methods
public has($key):bool
Determine if the given session value exists.
Name |
Type |
Description |
|
public get($key, $default = null):void
Get the specified session value.
Name |
Type |
Description |
|
||
|
public set($key, $value = null):void
Set a given session value.
Name |
Type |
Description |
|
||
|
public prepend($key, $value):void
Prepend a value onto an array session value.
Name |
Type |
Description |
|
||
|
public push($key, $value):void
Push a value onto an array session value.
Name |
Type |
Description |
|
||
|
public static getPrefix():string
Validation
DummyAttribute
Dummy Attribute Class
Namespace
Plenty\Validation
Methods
public getAttributeName():string
Returns the attribute's name
public setAttributeName($attributeName):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
Sets the attribute's name
Name |
Type |
Description |
|
public accepted():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be yes, on, 1, or true. This is useful for validating "Terms of Service" acceptance.
public activeUrl():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid URL according to the checkdnsrr PHP function.
public dateAfter($fieldNameOrTimeStr):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a value after a given date. The dates will be passed into the strtotime PHP function.
Name |
Type |
Description |
|
public alphabetic():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be entirely alphabetic characters.
public alphaDash():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation may have alpha-numeric characters, as well as dashes and underscores.
public alphaNum():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be entirely alpha-numeric characters.
public isArray():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a PHP array.
public dateBefore($fieldNameOrTimeStr):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a value preceding the given date. The dates will be passed into the PHP strtotime function.
Name |
Type |
Description |
|
public between($min, $max):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have a size between the given min and max. Strings, numerics, and files are evaluated in the same fashion as the size rule.
Name |
Type |
Description |
|
||
|
public boolean():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be able to be cast as a boolean. Accepted input are true, false, 1, 0, "1", and "0".
public confirmed():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have a matching field of foo_confirmation. For example, if the field under validation is password, a matching password_confirmation field must be present in the input.
public date():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid date according to the strtotime PHP function.
public present():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
Validate that an attribute exists even if not filled.
public dateFormat($format):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must match the given format. The format will be evaluated using the PHP date_parse_from_format function.
Name |
Type |
Description |
|
public different($fieldName):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have a different value than field.
Name |
Type |
Description |
|
public digits($count):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be numeric and must have an exact length of $count.
Name |
Type |
Description |
|
public digitsBetween($min, $max):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have a length between the given min and max.
Name |
Type |
Description |
|
||
|
public email():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be formatted as an e-mail address.
public exists($table, $columns = []):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must exist on a given database table.
Name |
Type |
Description |
|
||
|
public image():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The file under validation must be an image (jpeg, png, bmp, gif, or svg)
public in($values):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be included in the given list of values.
Name |
Type |
Description |
|
public integer():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be an integer.
public ip():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be an IP address.
public json():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must a valid JSON string.
public max($value):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be less than or equal to a maximum value. Strings, numerics, and files are evaluated in the same fashion as the size rule.
Name |
Type |
Description |
|
public mimeTypes($types):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The file under validation must have a MIME type corresponding to one of the listed extensions.
Name |
Type |
Description |
|
public min($value):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have a minimum value. Strings, numerics, and files are evaluated in the same fashion as the size rule.
Name |
Type |
Description |
|
public notIn($values):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must not be included in the given list of values.
Name |
Type |
Description |
|
public numeric():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be numeric.
public regex($pattern):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must match the given regular expression.
Name |
Type |
Description |
|
public required():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be present in the input data and not empty. A field is considered "empty" is one of the following conditions are true: The value is null.
public requiredIf($fieldName, $value):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be present if the anotherfield field is equal to any value.
Name |
Type |
Description |
|
||
|
public requiredUnless($fieldName, $value):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be present unless the anotherfield field is equal to any value.
Name |
Type |
Description |
|
||
|
public requiredWith($fieldNames):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be present only if any of the other specified fields are present.
Name |
Type |
Description |
|
public requiredWithAll($fieldNames):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
required_with_all
Name |
Type |
Description |
|
public requiredWithout($fieldNames):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be present only when any of the other specified fields are not present.
Name |
Type |
Description |
|
public requiredWithoutAll($fieldNames):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be present only when all of the other specified fields are not present.
Name |
Type |
Description |
|
public notLike($fieldName):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be not like the specified name.
Name |
Type |
Description |
|
public same($fieldName):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The given field must match the field under validation.
Name |
Type |
Description |
|
public size($value):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have a size matching the given value. For string data, value corresponds to the number of characters.
Name |
Type |
Description |
|
public string():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a string.
public timezone():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid timezone identifier according to the timezone_identifiers_list PHP function.
public unique($table, $column, $except = null, $idColumn = null):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be unique on a given database table. If the column option is not specified, the field name will be used.
Name |
Type |
Description |
|
||
|
||
|
||
|
public url():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid URL according to PHP's filter_var function.
public sometimes():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
In some situations, you may wish to run validation checks against a field only if that field is present in the input array. To quickly accomplish this, add the sometimes rule.
public nullable():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation may be null. This is particularly useful when validating primitive such as strings and integers that can contain null values.
public generateRulesContent():void
Returns all rules connected to the attribute
public dateW3C($allowTimestamps = false):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid w3c formated date time string.
Name |
Type |
Description |
|
Allow timestamps as a valid format as well. |
public inTimestampRange():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a w3c formated date time string that is in the MySQL timestamp range (1970 to 2037).
public validOrderId():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid order ID for an order that is not deleted.
public validOrderItemId():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid order item ID for an order that is not deleted.
public customRule($rule, $params):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
Add custom Role
Name |
Type |
Description |
|
||
|
public validPlentyId():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid plentyId.
public validPlentyUrl():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field must be a valid URL.
public validPlentyDomain():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
Custom validation rule for checking the existence of a given domain.
public typeFromDb($table, $column, $attribute, $comparisonKey = "id"):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must have the type specified in the database.
Name |
Type |
Description |
|
The table with the data type |
|
|
The column with the data type |
|
|
The attribute in the validator with the key |
|
|
The column to in $table to compare $attribute to. Default is 'id'. |
public hexColor():void
The field under validation must be a valid HEX color (like "#a3d" or "#a0787c").
public rgbColor():void
The field under validation must be a valid RGB or RGBA color (like "rgb(0, 200, 150)" or "rgba(0, 200, 150, 0.52)").
public cssColor():void
The field under validation must be a valid predefined CSS color (like "aquamarine" or "skyblue").
public color():void
The field under validation must be a valid color (HEX like "#a0787c", RGB like "rgb(0, 200, 150)" or CSS like "aquamarine")
public uuid5():void
The field under validation must be a valid UUID version 5.
public validDbType():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid data type used by the validation rule 'typeFromDb'.
public validCurrency():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid currency string (e.g. 'EUR').
public validBoardTaskReferenceValue():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid board task reference type (e.g. {@link BoardTaskReferenceType::CONTACT}).
public validPhoneNumber($option):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid phone number
Name |
Type |
Description |
|
public validMailAddress():Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be a valid mail address
public arrayKeysInList($acceptedKeysList):Plenty\Validation\DummyAttribute
Return type: DummyAttribute
The field under validation must be an array and must contain only the keys in the provided accepted list.
Name |
Type |
Description |
|
RulesCollection
RulesCollection represents a collection of rules connected to an attribute
Namespace
Plenty\Validation
Methods
public add($attributeName):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add attribute without type
Name |
Type |
Description |
|
public addConditional($attributeName, $required):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add attribute without type (with or without requirement)
Name |
Type |
Description |
|
||
|
public addInt($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add int attribute
Name |
Type |
Description |
|
||
|
public addNumeric($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add numeric attribute
Name |
Type |
Description |
|
||
|
public addDate($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add date attribute
Name |
Type |
Description |
|
||
|
public addBool($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add bool attribute
Name |
Type |
Description |
|
||
|
public addString($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add string attribute
Name |
Type |
Description |
|
||
|
public sometimes($attributeName, $condition):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add a rule for an attribute based on the result of the condition callback.
Name |
Type |
Description |
|
||
|
public arrayKeysInList($attributeName, $acceptedKeysList):Plenty\Validation\Contracts\Attribute
Validator
Base Validator Class
Namespace
Plenty\Validation
Name | Type | Description |
---|---|---|
customMessageKey |
Methods
public static validateOrFail($data):void
Validate the given data against the rules of this validtor
Name |
Type |
Description |
|
public each($attributeName):Plenty\Validation\RulesCollection
Return type: RulesCollection
Add conditions to each item of a list
Name |
Type |
Description |
|
public buildCustomMessages():array
Load translated custom message
public getAttributeValue($attribute):void
Get the value of the given attribute.
Name |
Type |
Description |
|
public defineAttributes():void
Must be implemented in each subclass. Define the attributes for the validator.
public add($attributeName):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add attribute without type
Name |
Type |
Description |
|
public addConditional($attributeName, $required):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add attribute without type (with or without requirement)
Name |
Type |
Description |
|
||
|
public addInt($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add int attribute
Name |
Type |
Description |
|
||
|
public addNumeric($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add numeric attribute
Name |
Type |
Description |
|
||
|
public addDate($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add date attribute
Name |
Type |
Description |
|
||
|
public addBool($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add bool attribute
Name |
Type |
Description |
|
||
|
public addString($attributeName, $required = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add string attribute
Name |
Type |
Description |
|
||
|
public sometimes($attributeName, $condition):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add a rule for an attribute based on the result of the condition callback.
Name |
Type |
Description |
|
||
|
public arrayKeysInList($attributeName, $acceptedKeysList):Plenty\Validation\Contracts\Attribute
Exceptions
ValidationException
Namespace
Plenty\Exceptions
Name | Type | Description |
---|---|---|
messageBag |
Methods
public getMessageBag():Illuminate\Support\MessageBag
Return type: MessageBag
public setMessageBag($messageBag):Plenty\Exceptions\ValidationException
Return type: ValidationException
Name |
Type |
Description |
|
Plugin
Events
Dispatcher
Dispatcher
Namespace
Plenty\Plugin\Events
Methods
public isPublicEvent($event):bool
Name |
Type |
Description |
|
public listen($event, $listener, $priority):void
Register an event listener with the dispatcher.
Name |
Type |
Description |
|
||
|
||
|
public hasListeners($event):bool
Determine if a given event has listeners.
Name |
Type |
Description |
|
public fire($event, $payload = []):void
Fire an event and call the listeners.
Name |
Type |
Description |
|
||
|
public dispatch($event, $payload = []):void
Fire an event and call the listeners.
Name |
Type |
Description |
|
||
|
public forget($event):void
Remove a set of listeners from the dispatcher.
Name |
Type |
Description |
|
public static getPrefix():string
Http
Request
http request
Namespace
Plenty\Plugin\Http
Methods
public all():array
Get all of the input and files for the request.
public merge($input):void
Merge new input into the current request's input array.
Name |
Type |
Description |
|
public replace($input):void
Replace the input for the current request.
Name |
Type |
Description |
|
public get($key, $default = null, $deep = false):void
Name |
Type |
Description |
|
||
|
||
|
public getContent():string
Returns the request body content.
public getRequestUri():string
Returns the requested URI (path and query string).
public exists($key):bool
Determine if the request contains a given input item key.
Name |
Type |
Description |
|
public has($key):bool
Determine if the request contains a non-empty value for an input item.
Name |
Type |
Description |
|
public input($key = null, $default = null):void
Retrieve an input item from the request.
Name |
Type |
Description |
|
||
|
public only($keys):array
Get a subset of the items from the input data.
Name |
Type |
Description |
|
public except($keys):array
Get all of the input except for a specified array of items.
Name |
Type |
Description |
|
public query($key = null, $default = null):void
Retrieve a query string item from the request.
Name |
Type |
Description |
|
||
|
public hasHeader($key):bool
Determine if a header is set on the request.
Name |
Type |
Description |
|
public header($key = null, $default = null):void
Retrieve a header from the request.
Name |
Type |
Description |
|
||
|
public isJson():bool
Determine if the request is sending JSON.
public wantsJson():bool
Determine if the current request is asking for JSON in return.
public accepts($contentTypes):bool
Determines whether the current requests accepts a given content type.
Name |
Type |
Description |
|
public prefers($contentTypes):string
Return the most suitable content type from the given array based on content negotiation.
Name |
Type |
Description |
|
public acceptsJson():bool
Determines whether a request accepts JSON.
public acceptsHtml():bool
Determines whether a request accepts HTML.
public format($default = "html"):string
Get the data format expected in the response.
Name |
Type |
Description |
|
public getUserInfo():string
Gets the user info.
public getHttpHost():string
Returns the HTTP host being requested.
public getSchemeAndHttpHost():string
Gets the scheme and HTTP host.
public getUri():string
Generates a normalized URI (URL) for the Request.
public getUriForPath($path):string
Generates a normalized URI for the given path.
Name |
Type |
Description |
|
A path to use instead of the current one |
public getQueryString():string
Generates the normalized query string for the Request.
public getMethod():string
Gets the request "intended" method.
public getLocale():string
Get the locale.
Response
Class to create different types of http response.
Namespace
Plenty\Plugin\Http
Methods
public getHeaders():void
Get the headers for the response.
public status():int
Get the status code for the response.
public content():string
Get the content of the response.
public make($content = "", $status = 200, $headers = []):Plenty\Plugin\Http\Response
Return type: Response
Return a new response from the application.
Name |
Type |
Description |
|
||
|
||
|
public view($view, $data = [], $status = 200, $headers = []):Plenty\Plugin\Http\Response
Return type: Response
Return a new view response from the application.
Name |
Type |
Description |
|
||
|
||
|
||
|
public json($data = [], $status = 200, $headers = [], $options):Symfony\Component\HttpFoundation\Response
Return type: Response
Return a new JSON response from the application.
Name |
Type |
Description |
|
||
|
||
|
||
|
public jsonp($callback, $data = [], $status = 200, $headers = [], $options):Symfony\Component\HttpFoundation\Response
Return type: Response
Return a new JSONP response from the application.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
public stream($callback, $status = 200, $headers = []):Symfony\Component\HttpFoundation\Response
Return type: Response
Return a new streamed response from the application.
Name |
Type |
Description |
|
||
|
||
|
public redirectTo($path, $status = 302, $headers = [], $secure = null):Symfony\Component\HttpFoundation\Response
Return type: Response
Create a new redirect response to the given path.
Name |
Type |
Description |
|
||
|
||
|
||
|
public redirectToRoute($route, $parameters = [], $status = 302, $headers = []):Symfony\Component\HttpFoundation\Response
Return type: Response
Create a new redirect response to a named route.
Name |
Type |
Description |
|
||
|
||
|
||
|
public redirectToAction($action, $parameters = [], $status = 302, $headers = []):Symfony\Component\HttpFoundation\Response
Return type: Response
Create a new redirect response to a controller action.
Name |
Type |
Description |
|
||
|
||
|
||
|
public redirectGuest($path, $status = 302, $headers = [], $secure = null):Symfony\Component\HttpFoundation\Response
Return type: Response
Create a new redirect response, while putting the current URL in the session.
Name |
Type |
Description |
|
||
|
||
|
||
|
public redirectToIntended($default = "/", $status = 302, $headers = [], $secure = null):Symfony\Component\HttpFoundation\Response
Return type: Response
Create a new redirect response to the previously intended location.
Name |
Type |
Description |
|
||
|
||
|
||
|
public sendHeaders():Plenty\Plugin\Http\Response
Return type: Response
Send the HTTP headers without sending the whole response.
public forceStatus($status = 200):Plenty\Plugin\Http\Response
Return type: Response
Force sending response with defined status instead of falling back to default handlers in case of 40* status codes.
Name |
Type |
Description |
|
public isStatusForced():bool
Check if response should be send instead of falling back to default handlers in case of 40* status codes.
Log
LoggerFactory
Logger factory
Namespace
Plenty\Plugin\Log
Methods
public getLogger($pluginNamespace, $identifier):Plenty\Log\Contracts\LoggerContract
Return type: LoggerContract
Name |
Type |
Description |
|
||
|
Routing
ApiRouter
Api router service
Namespace
Plenty\Plugin\Routing
Methods
public version($version, $second, $third = null):void
Name |
Type |
Description |
|
||
|
||
|
public get($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new GET route with the router.
Name |
Type |
Description |
|
||
|
public post($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new POST route with the router.
Name |
Type |
Description |
|
||
|
public put($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new PUT route with the router.
Name |
Type |
Description |
|
||
|
public patch($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new PATCH route with the router.
Name |
Type |
Description |
|
||
|
public delete($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new DELETE route with the router.
Name |
Type |
Description |
|
||
|
public options($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new OPTIONS route with the router.
Name |
Type |
Description |
|
||
|
public any($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new route responding to all verbs.
Name |
Type |
Description |
|
||
|
public resource($name, $controller, $options = []):void
Route a resource to a controller.
Name |
Type |
Description |
|
||
|
||
|
public match($methods, $uri, $action):Plenty\Plugin\Routing\Route
Route
Route
Namespace
Plenty\Plugin\Routing
Methods
public addMiddleware($middleware):Plenty\Plugin\Routing\Route
Return type: Route
Add middlewares attached to the route.
Name |
Type |
Description |
|
public middleware($middleware = []):Plenty\Plugin\Routing\Route
Return type: Route
Get or set the middlewares attached to the route.
Name |
Type |
Description |
|
public getMiddleware():array
public where($name, $expression = null):Plenty\Plugin\Routing\Route
Router
Router service
Namespace
Plenty\Plugin\Routing
Methods
public static addRoute($route):void
Name |
Type |
Description |
|
public get($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new GET route with the router.
Name |
Type |
Description |
|
||
|
public post($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new POST route with the router.
Name |
Type |
Description |
|
||
|
public put($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new PUT route with the router.
Name |
Type |
Description |
|
||
|
public patch($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new PATCH route with the router.
Name |
Type |
Description |
|
||
|
public delete($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new DELETE route with the router.
Name |
Type |
Description |
|
||
|
public options($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new OPTIONS route with the router.
Name |
Type |
Description |
|
||
|
public any($uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new route responding to all verbs.
Name |
Type |
Description |
|
||
|
public match($methods, $uri, $action):Plenty\Plugin\Routing\Route
Return type: Route
Register a new route with the given verbs.
Name |
Type |
Description |
|
||
|
||
|
public middleware($name, $class):Plenty\Plugin\Routing\Router
Return type: Router
Register a short-hand name for a middleware.
Name |
Type |
Description |
|
||
|
public prepareResponse($request, $response):Plenty\Plugin\Http\Response
Templates
Markdown
A simple markdown converter.
Namespace
Plenty\Plugin\Templates
Methods
public renderToHtml($markdownContent):string
Name |
Type |
Description |
|
Twig
Twig engine
Namespace
Plenty\Plugin\Templates
Methods
public render($name, $context = []):string
Renders a template.
Name |
Type |
Description |
|
The template name |
|
|
An array of parameters to pass to the template |
public renderString($templateContent, $context = []):string
Compile and render a twig template from a string.
Name |
Type |
Description |
|
The template to render |
|
|
An array of parameters to pass to the template |
public addExtension($extension):void
Registers an extension.
Name |
Type |
Description |
|
A Twig_ExtensionInterface instance |
Translation
Translator
translation service
Namespace
Plenty\Plugin\Translation
Methods
public get($id, $parameters = [], $locale = null):void
Get the translation for a given key.
Name |
Type |
Description |
|
||
|
||
|
public trans($id, $parameters = [], $locale = null):void
Get the translation for a given key.
Name |
Type |
Description |
|
||
|
||
|
Data
Contracts
PropertyDescriptor
describes properties of a Model
Namespace
Plenty\Plugin\Data\Contracts
Methods
public getPropertyInformation($modelClassName):array
Name |
Type |
Description |
|
Resources
Resource
Namespace
Plenty\Plugin\Data\Contracts
Methods
public load($resourceName, $options = []):Plenty\Plugin\Data\Model\ResourceInformation
Return type: ResourceInformation
Name |
Type |
Description |
|
||
|
public exists($resourceName):bool
Name |
Type |
Description |
|
ExternalAuth
Contracts
ExternalAccessRepositoryContract
Find and create ExternalAccess-datasets
Namespace
Plenty\Plugin\ExternalAuth\Contracts
Methods
public create($data):Plenty\Plugin\ExternalAuth\Models\ExternalAccess
Return type: ExternalAccess
Create a new ExternalAccess record
Name |
Type |
Description |
|
The data for the ExternalAccess record to be created with. Must be an associative array with the keys 'contactId', 'accessType', 'externalContactId' and optionally an external 'accessToken'. |
public findForTypeAndExternalId($type, $externalId):Plenty\Plugin\ExternalAuth\Models\ExternalAccess
Return type: ExternalAccess
Find
Name |
Type |
Description |
|
The type of the external access |
|
|
The external ID of the contact |
public findForTypeAndContactId($type, $contactId):Plenty\Plugin\ExternalAuth\Models\ExternalAccess
Return type: ExternalAccess
Name |
Type |
Description |
|
The type of the external access |
|
|
The (internal) ID of the contact |
Models
ExternalAccess
Information on a contact's external access tokens
Namespace
Plenty\Plugin\ExternalAuth\Models
Name | Type | Description |
---|---|---|
contactId |
The ID of the contact in question. Must be unique in combination with $accessType. |
|
accessType |
The type/provider of external access. Must be unique in combination with $contactId. |
|
externalContactId |
The ID of the contact at the external provider. |
|
accessToken |
The token for the external access. |
|
lastUpdate |
The Date when this record was updated the last time. |
Methods
public toArray()
Returns this model as an array.
Contracts
AwsSesContract
Plugin AWS Simple Email Service
Namespace
Plenty\Plugin\Mail\Contracts
Methods
public sendEmail($email, $credentials):Plenty\Plugin\Mail\Models\EmailSenderResult
Return type: EmailSenderResult
Composes an email message and immediately queues it for sending via AWS SES
Name |
Type |
Description |
|
||
|
MailerContract
Plugin Mailer Service
Namespace
Plenty\Plugin\Mail\Contracts
Methods
public sendHtml($html, $recipients, $subject = "", $cc = [], $bcc = [], $replyTo = null, $attachments = []):void
Send an email containing html
Name |
Type |
Description |
|
The HTML-String for the email body |
|
|
Either a string containing a single email address or an array of strings containing multiple email addresses |
|
|
Optional. The subject of the message |
|
|
Optional. Array of strings containing email addresses which the message should be sent to as cc |
|
|
Optional. Array of strings containing email addresses which the message should be sent to as bcc |
|
|
Optional. ReplyToRecipient model with mailaddress and name attributes |
|
|
Optional. A list of StorageObject objects ( see Plenty\Modules\Plugin\Storage\Contracts\StorageRepositoryContract ) |
public sendFromTwig($twigPath, $data, $recipients, $subject = "", $altConfig = [], $cc = [], $bcc = [], $replyTo = null, $attachments = []):void
Send an email that will get rendered by twig
Name |
Type |
Description |
|
The path to the twig template file that should be used to render the mail. E.g.: 'PluginNamespace::mail.my_mail' |
|
|
An associative array of data that will be available to the twig template |
|
|
Either a string containing a single email address or an array of strings containing multiple email addresses |
|
|
Optional. The subject of the message |
|
|
Optional. Alternative email config. If present MUST be an associative array with the keys 'host', 'port', 'username', 'password' and 'encryption'. It CAN optionally have a key 'from' to set the sender-address to something else than specified in the system config. If 'from' is missing, the system-wide configured sender-address is used. |
|
|
Optional. Array of strings containing email addresses which the message should be sent to as cc |
|
|
Optional. Array of strings containing email addresses which the message should be sent to as bcc |
|
|
Optional. ReplyToRecipient model with mailaddress and name attributes |
|
|
Optional. A list of StorageObject objects ( see Plenty\Modules\Plugin\Storage\Contracts\StorageRepositoryContract ) |
public sendFromMime($mimeMessage, $recipients, $altConfig = [], $cc = [], $bcc = [], $replyTo = null, $attachments = []):void
Send given message as email
Name |
Type |
Description |
|
Complete email mime source header included |
|
|
Either a string containing a single email address or an array of strings containing multiple email addresses |
|
|
Optional. Alternative email config. If present MUST be an associative array with the keys 'host', 'port', 'username', 'password' and 'encryption'. It CAN optionally have a key 'from' to set the sender-address to something else than specified in the system config. If 'from' is missing, the system-wide configured sender-address is used. |
|
|
Optional. Array of strings containing email addresses which the message should be sent to as cc |
|
|
Optional. Array of strings containing email addresses which the message should be sent to as bcc |
|
|
Optional. ReplyToRecipient model with mailaddress and name attributes |
|
|
Optional. A list of StorageObject objects ( see Plenty\Modules\Plugin\Storage\Contracts\StorageRepositoryContract ) |
Models
AwsSesCredentials
the credential model for AWS SES client.
Namespace
Plenty\Plugin\Mail\Models
Name | Type | Description |
---|---|---|
region |
AWS region e.g. eu-west-1 |
|
accessKeyId |
User access key |
|
secretAccessKey |
User secret access key |
Methods
public toArray()
Returns this model as an array.
the email model.
Namespace
Plenty\Plugin\Mail\Models
Name | Type | Description |
---|---|---|
bccAddresses |
BCC email address |
|
ccAddresses |
CC email address |
|
toAddresses |
To email address |
|
senderAddress |
Sender email address |
|
replyToAddresses |
Reply to email address |
|
subject |
Email subject |
|
htmlBody |
HTML email body |
|
plainTextBody |
Plain text email body |
|
rawMessage |
MIME message, if set subject, html and plainText are ignored |
Methods
public toArray()
Returns this model as an array.
Templates
Extensions
Factories
TwigFactory
Twig Factory
Namespace
Plenty\Plugin\Templates\Factories
Methods
public register():void
public createSimpleFunction($name, $callable, $params = []):Plenty\Plugin\Templates\Extensions\Twig_SimpleFunction
Return type: Twig_SimpleFunction
Name |
Type |
Description |
|
||
|
||
|
An array of parameters |
public createSimpleFilter($name, $callable, $params = []):Plenty\Plugin\Templates\Extensions\Twig_SimpleFilter
Return type: Twig_SimpleFilter
Name |
Type |
Description |
|
||
|
||
|
An array of parameters |
Repositories
Contracts
DeleteResponseContract
DeleteResponse Interface
Namespace
Plenty\Repositories\Contracts
Methods
public getAffectedRows():int
public setAffectedRows($value):void
Name |
Type |
Description |
|
public increment():int
public decrement():int
PaginationResponseContract
Contract for PaginationResponse
Namespace
Plenty\Repositories\Contracts
Methods
public getTotal():void
public setTotal($total):void
Name |
Type |
Description |
|
public getPage():void
public setPage($page):void
Name |
Type |
Description |
|
public getEntriesPerPage():void
public setEntriesPerPage($epp):void
Name |
Type |
Description |
|
public getResult():void
public setResult($entries):void
Name |
Type |
Description |
|
public toJson($options):string
Convert the object to its JSON representation.
Name |
Type |
Description |
|
public toArray():array
Get the instance as an array.
Criteria
Models
FilteredPaginatedResult
Filtered paginated result
Namespace
Plenty\Repositories\Models
Methods
public getFilters():array
public setFilters($filters):void
Name |
Type |
Description |
|
public toArray():array
Get the instance as an array.
public paginate():Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
public getPage():int
Returns the page number as received
public getCurrentPage():int
Returns the normalized page number - checked if out of logical bounds ( not below 0, not greater than the last page ) and adjusted
public getTotalCount():int
public isLastPage():bool
public getItemIndexFrom():int
public getItemIndexTo():int
public getLastPage():int
public getResult():array
public setResult($result):void
Name |
Type |
Description |
|
public sumMetaData($metaColumn = "", $groupBy = "", $metaDataName = ""):void
Name |
Type |
Description |
|
||
|
||
|
public rowCountMetaData($metaColumn = "", $groupBy = "", $metaDataName = ""):void
Name |
Type |
Description |
|
||
|
||
|
public toJson($options):string
Convert the object to its JSON representation.
Name |
Type |
Description |
|
public jsonSerialize():void
Specify data which should be serialized to JSON
PaginatedResult
paginated result
Namespace
Plenty\Repositories\Models
Methods
public paginate():Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
public getPage():int
Returns the page number as received
public getCurrentPage():int
Returns the normalized page number - checked if out of logical bounds ( not below 0, not greater than the last page ) and adjusted
public getTotalCount():int
public isLastPage():bool
public getItemIndexFrom():int
public getItemIndexTo():int
public getLastPage():int
public getResult():array
public setResult($result):void
Name |
Type |
Description |
|
public sumMetaData($metaColumn = "", $groupBy = "", $metaDataName = ""):void
Name |
Type |
Description |
|
||
|
||
|
public rowCountMetaData($metaColumn = "", $groupBy = "", $metaDataName = ""):void
Name |
Type |
Description |
|
||
|
||
|
public toArray():array
Get the instance as an array.
public toJson($options):string
Convert the object to its JSON representation.
Name |
Type |
Description |
|
public jsonSerialize():void
Specify data which should be serialized to JSON
Services
RequestPaginationOptionsProvider
Array pagination
Namespace
Plenty\Repositories\Services
Methods
public setCurrentItemsPerPage($currentItemsPerPage):Plenty\Repositories\Services\RequestPaginationOptionsProvider
Return type: RequestPaginationOptionsProvider
Name |
Type |
Description |
|
public setCurrentPage($currentPage):Plenty\Repositories\Services\RequestPaginationOptionsProvider
Return type: RequestPaginationOptionsProvider
Name |
Type |
Description |
|
public getCurrentItemsPerPage():int
public getCurrentPage():int
SimpleArrayPagination
Array pagination
Namespace
Plenty\Repositories\Services
Methods
public buildResult($page, $offset):Illuminate\Support\Collection
Criteria
Containers
CriteriaContainer
Register repository criteria
Namespace
Plenty\Repositories\Criteria\Containers
Methods
public add($repository, $criteria, $key):Plenty\Repositories\Criteria\Containers\CriteriaContainer
Return type: CriteriaContainer
Use this method to add criteria to a existing repository.
Name |
Type |
Description |
|
The repository that should use the criteria |
|
|
The criteria class name that should be used. |
|
|
The key that should match the given criteria. |
Contracts
CriteriableContract
Interface which provides the possibility to use Criteria filters.
Namespace
Plenty\Repositories\Criteria\Contracts
Methods
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
Validation
Contracts
Attribute
Common interface for attribute classes
Namespace
Plenty\Validation\Contracts
Methods
public getAttributeName():string
Returns the attribute's name
public setAttributeName($attributeName):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Sets the attribute's name
Name |
Type |
Description |
|
public accepted():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be yes, on, 1, or true. This is useful for validating "Terms of Service" acceptance.
public customRule($rule, $params):Plenty\Validation\Contracts\Attribute
Return type: Attribute
Add custom Role
Name |
Type |
Description |
|
||
|
public activeUrl():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid URL according to the checkdnsrr PHP function.
public dateAfter($fieldNameOrTimeStr):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a value after a given date. The dates will be passed into the strtotime PHP function. Instead of passing a date string to be evaluated by strtotime, you may specify another field to compare against the date
Name |
Type |
Description |
|
public alphabetic():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be entirely alphabetic characters.
public alphaDash():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation may have alpha-numeric characters, as well as dashes and underscores.
public alphaNum():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be entirely alpha-numeric characters.
public isArray():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a PHP array.
public dateBefore($fieldNameOrTimeStr):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a value preceding the given date. The dates will be passed into the PHP strtotime function.
Name |
Type |
Description |
|
public between($min, $max):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have a size between the given min and max. Strings, numerics, and files are evaluated in the same fashion as the size rule.
Name |
Type |
Description |
|
||
|
public boolean():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be able to be cast as a boolean. Accepted input are true, false, 1, 0, "1", and "0".
public confirmed():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have a matching field of foo_confirmation. For example, if the field under validation is password, a matching password_confirmation field must be present in the input.
public present():Plenty\Validation\Contracts\Attribute
Return type: Attribute
Validate that an attribute exists even if not filled.
public date():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid date according to the strtotime PHP function.
public dateFormat($format):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must match the given format. The format will be evaluated using the PHP date_parse_from_format function. You should use either date or date_format when validating a field, not both.
Name |
Type |
Description |
|
public dateW3C($allowTimestamps = false):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid w3c formated date time string.
Name |
Type |
Description |
|
Allow timestamps as a valid format as well. |
public inTimestampRange():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a w3c formated date time string that is in the MySQL timestamp range (1970 to 2037).
public validOrderId():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid order ID for an order that is not deleted.
public validOrderItemId():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid order item ID for an order that is not deleted.
public validPlentyId():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid plentyId.
public validPlentyUrl():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid plentyId.
public validPlentyDomain():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a unique domain.
public typeFromDb($table, $column, $attribute, $comparisonKey = "id"):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have the type specified in the database.
Name |
Type |
Description |
|
The table with the data type |
|
|
The column with the data type |
|
|
The attribute in the validator with the key |
|
|
The column to in $table to compare $attribute to. Default is 'id'. |
public hexColor():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid HEX color (like "#a3d" or "#a0787c").
public rgbColor():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid RGB or RGBA color (like "rgb(0, 200, 150)" or "rgba(0, 200, 150, 0.52)").
public cssColor():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid predefined CSS color (like "aquamarine" or "skyblue").
public color():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid color (HEX like "#a0787c", RGB like "rgb(0, 200, 150)" or CSS like "aquamarine")
public uuid5():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid UUID version 5.
public validDbType():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid data type used by the validation rule 'typeFromDb'.
public validCurrency():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid currency string (e.g. 'EUR').
public different($fieldName):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have a different value than field.
Name |
Type |
Description |
|
public digits($count):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be numeric and must have an exact length of $count.
Name |
Type |
Description |
|
public digitsBetween($min, $max):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have a length between the given min and max.
Name |
Type |
Description |
|
||
|
public email():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be formatted as an e-mail address.
public exists($table, $columns = []):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must exist on a given database table.
Name |
Type |
Description |
|
||
|
public image():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The file under validation must be an image (jpeg, png, bmp, gif, or svg)
public in($values):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be included in the given list of values.
Name |
Type |
Description |
|
public integer():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be an integer.
public ip():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be an IP address.
public json():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must a valid JSON string.
public max($value):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be less than or equal to a maximum value. Strings, numerics, and files are evaluated in the same fashion as the size rule.
Name |
Type |
Description |
|
public mimeTypes($types):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The file under validation must have a MIME type corresponding to one of the listed extensions.
Name |
Type |
Description |
|
public min($value):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have a minimum value. Strings, numerics, and files are evaluated in the same fashion as the size rule.
Name |
Type |
Description |
|
public notIn($values):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must not be included in the given list of values.
Name |
Type |
Description |
|
public numeric():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be numeric.
public regex($pattern):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must match the given regular expression.
Name |
Type |
Description |
|
public required():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be present in the input data and not empty. A field is considered "empty" is one of the following conditions are true: The value is null. The value is an empty string. The value is an empty array or empty Countable object. The value is an uploaded file with no path.
public requiredIf($fieldName, $value):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be present if the anotherfield field is equal to any value.
Name |
Type |
Description |
|
||
|
public requiredUnless($fieldName, $value):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be present unless the anotherfield field is equal to any value.
Name |
Type |
Description |
|
||
|
public requiredWith($fieldNames):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be present only if any of the other specified fields are present.
Name |
Type |
Description |
|
public requiredWithAll($fieldNames):Plenty\Validation\Contracts\Attribute
Return type: Attribute
required_with_all
Name |
Type |
Description |
|
public requiredWithout($fieldNames):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be present only when any of the other specified fields are not present.
Name |
Type |
Description |
|
public requiredWithoutAll($fieldNames):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be present only when all of the other specified fields are not present.
Name |
Type |
Description |
|
public notLike($fieldName):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be not like the specified name.
Name |
Type |
Description |
|
public same($fieldName):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The given field must match the field under validation.
Name |
Type |
Description |
|
public size($value):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must have a size matching the given value. For string data, value corresponds to the number of characters. For numeric data, value corresponds to a given integer value. For files, size corresponds to the file size in kilobytes.
Name |
Type |
Description |
|
public string():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a string.
public timezone():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid timezone identifier according to the timezone_identifiers_list PHP function.
public unique($table, $column, $except = null, $idColumn = null):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be unique on a given database table. If the column option is not specified, the field name will be used.
Name |
Type |
Description |
|
||
|
||
|
||
|
public url():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid URL according to PHP's filter_var function.
public sometimes():Plenty\Validation\Contracts\Attribute
Return type: Attribute
In some situations, you may wish to run validation checks against a field only if that field is present in the input array. To quickly accomplish this, add the sometimes rule.
public nullable():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation may be null. This is particularly useful when validating primitive such as strings and integers that can contain null values.
public validBoardTaskReferenceValue():Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be a valid board task reference type (e.g. {@link BoardTaskReferenceType::CONTACT}).
public arrayKeysInList($acceptedKeysList):Plenty\Validation\Contracts\Attribute
Return type: Attribute
The field under validation must be an array and must contain only the keys in the provided accepted list.
Name |
Type |
Description |
|
Illuminate
Support
MessageBag
Namespace
Illuminate\Support
Methods
public keys():array
Get the keys present in the message bag.
public add($key, $message):Illuminate\Support\MessageBag
Return type: MessageBag
Add a message to the message bag.
Name |
Type |
Description |
|
||
|
public addIf($boolean, $key, $message):Illuminate\Support\MessageBag
Return type: MessageBag
Add a message to the message bag if the given conditional is "true".
Name |
Type |
Description |
|
||
|
||
|
public merge($messages):Illuminate\Support\MessageBag
Return type: MessageBag
Merge a new array of messages into the message bag.
Name |
Type |
Description |
|
public has($key):bool
Determine if messages exist for all of the given keys.
Name |
Type |
Description |
|
public hasAny($keys = []):bool
Determine if messages exist for any of the given keys.
Name |
Type |
Description |
|
public first($key = null, $format = null):string
Get the first message from the message bag for a given key.
Name |
Type |
Description |
|
||
|
public get($key, $format = null):array
Get all of the messages from the message bag for a given key.
Name |
Type |
Description |
|
||
|
public all($format = null):array
Get all of the messages for every key in the message bag.
Name |
Type |
Description |
|
public unique($format = null):array
Get all of the unique messages for every key in the message bag.
Name |
Type |
Description |
|
public messages():array
Get the raw messages in the message bag.
public getMessages():array
Get the raw messages in the message bag.
public getMessageBag():Illuminate\Support\Illuminate\Support\MessageBag
Return type: MessageBag
Get the messages for the instance.
public getFormat():string
Get the default message format.
public setFormat($format = ":message"):Illuminate\Support\Illuminate\Support\MessageBag
Return type: MessageBag
Set the default message format.
Name |
Type |
Description |
|
public isEmpty():bool
Determine if the message bag has any messages.
public isNotEmpty():bool
Determine if the message bag has any messages.
public any():bool
Determine if the message bag has any messages.
public count():int
Get the number of messages in the message bag.
public toArray():array
Get the instance as an array.
public jsonSerialize():array
Convert the object into something JSON serializable.
public toJson($options):string
Convert the object to its JSON representation.
Name |
Type |
Description |
|
Collection
Namespace
Illuminate\Support
Methods
public all():array
Get all of the items in the collection.
public avg($callback = null):void
Get the average value of a given key.
Name |
Type |
Description |
|
public mode($key = null):array
Get the mode of a given key.
Name |
Type |
Description |
|
public collapse():Illuminate\Support\Collection
Return type: Collection
Collapse the collection of items into a single array.
public contains($key, $operator = null, $value = null):bool
Determine if an item exists in the collection.
Name |
Type |
Description |
|
||
|
||
|
public containsStrict($key, $value = null):bool
Determine if an item exists, using strict comparison.
Name |
Type |
Description |
|
||
|
public crossJoin($lists):Illuminate\Support\Collection
Return type: Collection
Cross join with the given lists, returning all possible permutations.
Name |
Type |
Description |
|
public diff($items):Illuminate\Support\Collection
Return type: Collection
Get the items in the collection that are not present in the given items.
Name |
Type |
Description |
|
public diffAssoc($items):Illuminate\Support\Collection
Return type: Collection
Get the items in the collection whose keys and values are not present in the given items.
Name |
Type |
Description |
|
public diffKeys($items):Illuminate\Support\Collection
Return type: Collection
Get the items in the collection whose keys are not present in the given items.
Name |
Type |
Description |
|
public except($keys):Illuminate\Support\Collection
Return type: Collection
Get all items except for those with the specified keys.
Name |
Type |
Description |
|
public filter($callback = null):Illuminate\Support\Collection
Return type: Collection
Run a filter over each of the items.
Name |
Type |
Description |
|
public first($callback = null, $default = null):void
Get the first item from the collection passing the given truth test.
Name |
Type |
Description |
|
||
|
public flip():Illuminate\Support\Collection
Return type: Collection
Flip the items in the collection.
public forget($keys):Illuminate\Support\Collection
Return type: Collection
Remove an item from the collection by key.
Name |
Type |
Description |
|
public get($key, $default = null):void
Get an item from the collection by key.
Name |
Type |
Description |
|
||
|
public groupBy($groupBy, $preserveKeys = false):Illuminate\Support\Collection
Return type: Collection
Group an associative array by a field or using a callback.
Name |
Type |
Description |
|
||
|
public keyBy($keyBy):Illuminate\Support\Collection
Return type: Collection
Key an associative array by a field or using a callback.
Name |
Type |
Description |
|
public has($key):bool
Determine if an item exists in the collection by key.
Name |
Type |
Description |
|
public implode($value, $glue = null):string
Concatenate values of a given key as a string.
Name |
Type |
Description |
|
||
|
public intersect($items):Illuminate\Support\Collection
Return type: Collection
Intersect the collection with the given items.
Name |
Type |
Description |
|
public intersectByKeys($items):Illuminate\Support\Collection
Return type: Collection
Intersect the collection with the given items by key.
Name |
Type |
Description |
|
public isEmpty():bool
Determine if the collection is empty or not.
public keys():Illuminate\Support\Collection
Return type: Collection
Get the keys of the collection items.
public last($callback = null, $default = null):void
Get the last item from the collection.
Name |
Type |
Description |
|
||
|
public pluck($value, $key = null):Illuminate\Support\Collection
Return type: Collection
Get the values of a given key.
Name |
Type |
Description |
|
||
|
public map($callback):Illuminate\Support\Collection
Return type: Collection
Run a map over each of the items.
Name |
Type |
Description |
|
public mapToDictionary($callback):Illuminate\Support\Collection
Return type: Collection
Run a dictionary map over the items.
Name |
Type |
Description |
|
public mapWithKeys($callback):Illuminate\Support\Collection
Return type: Collection
Run an associative map over each of the items.
Name |
Type |
Description |
|
public merge($items):Illuminate\Support\Collection
Return type: Collection
Merge the collection with the given items.
Name |
Type |
Description |
|
public combine($values):Illuminate\Support\Collection
Return type: Collection
Create a collection by using this collection for keys and another for its values.
Name |
Type |
Description |
|
public union($items):Illuminate\Support\Collection
Return type: Collection
Union the collection with the given items.
Name |
Type |
Description |
|
public nth($step, $offset):Illuminate\Support\Collection
Return type: Collection
Create a new collection consisting of every n-th element.
Name |
Type |
Description |
|
||
|
public only($keys):Illuminate\Support\Collection
Return type: Collection
Get the items with the specified keys.
Name |
Type |
Description |
|
public pop($count = 1):Illuminate\Support\Collection
Return type: Collection
Get and remove the last N items from the collection.
Name |
Type |
Description |
|
public prepend($value, $key = null):Illuminate\Support\Collection
Return type: Collection
Push an item onto the beginning of the collection.
Name |
Type |
Description |
|
||
|
public push($values):Illuminate\Support\Collection
Return type: Collection
Push one or more items onto the end of the collection.
Name |
Type |
Description |
|
public pull($key, $default = null):void
Get and remove an item from the collection.
Name |
Type |
Description |
|
||
|
public put($key, $value):Illuminate\Support\Collection
Return type: Collection
Put an item in the collection by key.
Name |
Type |
Description |
|
||
|
public random($number = null):Illuminate\Support\Collection
Return type: Collection
Get one or a specified number of items randomly from the collection.
Name |
Type |
Description |
|
public reverse():Illuminate\Support\Collection
Return type: Collection
Reverse items order.
public search($value, $strict = false):void
Search the collection for a given value and return the corresponding key if successful.
Name |
Type |
Description |
|
||
|
public shift($count = 1):Illuminate\Support\Collection
Return type: Collection
Get and remove the first N items from the collection.
Name |
Type |
Description |
|
public shuffle($seed = null):Illuminate\Support\Collection
Return type: Collection
Shuffle the items in the collection.
Name |
Type |
Description |
|
public slice($offset, $length = null):Illuminate\Support\Collection
Return type: Collection
Slice the underlying collection array.
Name |
Type |
Description |
|
||
|
public split($numberOfGroups):Illuminate\Support\Collection
Return type: Collection
Split a collection into a certain number of groups.
Name |
Type |
Description |
|
public chunk($size):Illuminate\Support\Collection
Return type: Collection
Chunk the collection into chunks of the given size.
Name |
Type |
Description |
|
public sort($callback = null):Illuminate\Support\Collection
Return type: Collection
Sort through each item with a callback.
Name |
Type |
Description |
|
public splice($offset, $length = null, $replacement = []):Illuminate\Support\Collection
Return type: Collection
Splice a portion of the underlying collection array.
Name |
Type |
Description |
|
||
|
||
|
public take($limit):Illuminate\Support\Collection
Return type: Collection
Take the first or last {$limit} items.
Name |
Type |
Description |
|
public transform($callback):Illuminate\Support\Collection
Return type: Collection
Transform each item in the collection using a callback.
Name |
Type |
Description |
|
public unique($key = null, $strict = false):Illuminate\Support\Collection
Return type: Collection
Return only unique items from the collection array.
Name |
Type |
Description |
|
||
|
public values():Illuminate\Support\Collection
Return type: Collection
Reset the keys on the underlying array.
public zip($items):Illuminate\Support\Collection
Return type: Collection
Zip the collection together with one or more arrays.
Name |
Type |
Description |
|
public pad($size, $value):Illuminate\Support\Collection
Return type: Collection
Pad collection to the specified length with a value.
Name |
Type |
Description |
|
||
|
public count():int
Count the number of items in the collection.
public offsetExists($key):bool
Determine if an item exists at an offset.
Name |
Type |
Description |
|
public offsetGet($key):void
Get an item at a given offset.
Name |
Type |
Description |
|
public offsetSet($key, $value):void
Set the item at a given offset.
Name |
Type |
Description |
|
||
|
public offsetUnset($key):void
Unset the item at a given offset.
Name |
Type |
Description |
|
public static make($items = []):Illuminate\Support\Collection
Return type: Collection
Create a new collection instance if the value isn't one already.
Name |
Type |
Description |
|
public static wrap($value):Illuminate\Support\Collection
Return type: Collection
Wrap the given value in a collection if applicable.
Name |
Type |
Description |
|
public static unwrap($value):array
Get the underlying items from the given collection if applicable.
Name |
Type |
Description |
|
public static times($number, $callback = null):Illuminate\Support\Collection
Return type: Collection
Create a new collection by invoking the callback a given amount of times.
Name |
Type |
Description |
|
||
|
public average($callback = null):void
Alias for the "avg" method.
Name |
Type |
Description |
|
public each($callback):Illuminate\Support\Collection
Return type: Collection
Execute a callback over each item.
Name |
Type |
Description |
|
public eachSpread($callback):Illuminate\Support\Collection
Return type: Collection
Execute a callback over each nested chunk of items.
Name |
Type |
Description |
|
public every($key, $operator = null, $value = null):bool
Determine if all items pass the given truth test.
Name |
Type |
Description |
|
||
|
||
|
public firstWhere($key, $operator = null, $value = null):void
Get the first item by the given key value pair.
Name |
Type |
Description |
|
||
|
||
|
public isNotEmpty():bool
Determine if the collection is not empty.
public mapSpread($callback):Illuminate\Support\Collection
Return type: Collection
Run a map over each nested chunk of items.
Name |
Type |
Description |
|
public mapToGroups($callback):Illuminate\Support\Collection
Return type: Collection
Run a grouping map over the items.
Name |
Type |
Description |
|
public flatMap($callback):Illuminate\Support\Collection
Return type: Collection
Map a collection and flatten the result by a single level.
Name |
Type |
Description |
|
public mapInto($class):Illuminate\Support\Collection
Return type: Collection
Map the values into a new class.
Name |
Type |
Description |
|
public min($callback = null):void
Get the min value of a given key.
Name |
Type |
Description |
|
public max($callback = null):void
Get the max value of a given key.
Name |
Type |
Description |
|
public forPage($page, $perPage):Illuminate\Support\Collection
Return type: Collection
"Paginate" the collection by slicing it into a smaller collection.
Name |
Type |
Description |
|
||
|
public partition($key, $operator = null, $value = null):Illuminate\Support\Collection
Return type: Collection
Partition the collection into two arrays using the given callback or key.
Name |
Type |
Description |
|
||
|
||
|
public sum($callback = null):void
Get the sum of the given values.
Name |
Type |
Description |
|
public where($key, $operator = null, $value = null):Illuminate\Support\Collection
Return type: Collection
Filter items by the given key value pair.
Name |
Type |
Description |
|
||
|
||
|
public whereStrict($key, $value):Illuminate\Support\Collection
Return type: Collection
Filter items by the given key value pair using strict comparison.
Name |
Type |
Description |
|
||
|
public whereIn($key, $values, $strict = false):Illuminate\Support\Collection
Return type: Collection
Filter items by the given key value pair.
Name |
Type |
Description |
|
||
|
||
|
public whereInStrict($key, $values):Illuminate\Support\Collection
Return type: Collection
Filter items by the given key value pair using strict comparison.
Name |
Type |
Description |
|
||
|
public whereNotIn($key, $values, $strict = false):Illuminate\Support\Collection
Return type: Collection
Filter items by the given key value pair.
Name |
Type |
Description |
|
||
|
||
|
public whereNotInStrict($key, $values):Illuminate\Support\Collection
Return type: Collection
Filter items by the given key value pair using strict comparison.
Name |
Type |
Description |
|
||
|
public pipe($callback):void
Pass the collection to the given callback and return the result.
Name |
Type |
Description |
|
public reduce($callback, $initial = null):void
Reduce the collection to a single value.
Name |
Type |
Description |
|
||
|
public reject($callback = true):Illuminate\Support\Collection
Return type: Collection
Create a collection of all elements that do not pass a given truth test.
Name |
Type |
Description |
|
public tap($callback):Illuminate\Support\Collection
Return type: Collection
Pass the collection to the given callback and then return it.
Name |
Type |
Description |
|
public uniqueStrict($key = null):Illuminate\Support\Collection
Return type: Collection
Return only unique items from the collection array using strict comparison.
Name |
Type |
Description |
|
public toArray():array
Get the collection of items as a plain array.
public jsonSerialize():array
Convert the object into something JSON serializable.
public toJson($options):string
Get the collection of items as JSON.
Name |
Type |
Description |
|
public static proxy($method):void
Add a method to the list of proxied methods.
Name |
Type |
Description |
|
public when($value = null, $callback = null, $default = null):Illuminate\Support\Collection
Return type: Collection
Apply the callback if the given "value" is (or resolves to) truthy.
Name |
Type |
Description |
|
||
|
||
|
public unless($value = null, $callback = null, $default = null):Illuminate\Support\Collection
Return type: Collection
Apply the callback if the given "value" is (or resolves to) falsy.
Name |
Type |
Description |
|
||
|
||
|
public static macro($name, $macro):void
Register a custom macro.
Name |
Type |
Description |
|
||
|
public static hasMacro($name):bool
Checks if macro is registered.
Name |
Type |
Description |
|
Carbon
Carbon
Namespace
Carbon
Name | Type | Description |
---|---|---|
year |
||
yearIso |
||
month |
||
day |
||
hour |
||
minute |
||
second |
||
micro |
||
microsecond |
||
timestamp |
||
englishDayOfWeek |
||
shortEnglishDayOfWeek |
||
englishMonth |
||
shortEnglishMonth |
||
milliseconds |
||
millisecond |
||
milli |
||
week |
||
isoWeek |
||
weekYear |
||
isoWeekYear |
||
dayOfYear |
||
age |
||
offset |
||
offsetMinutes |
||
offsetHours |
||
timezone |
||
tz |
Methods
public copy():Carbon\Carbon
Return type: Carbon
Returns a present instance in the same timezone.
public setDateTime($year, $month, $day, $hour, $minute, $second, $microseconds):Carbon\Carbon
Return type: Carbon
Set the date and time all together.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
public setTimeFromTimeString($time):Carbon\Carbon
Return type: Carbon
Set the time by time string.
Name |
Type |
Description |
|
public timezone($value):Carbon\Carbon
Return type: Carbon
Set the timezone or returns the timezone name if no arguments passed.
Name |
Type |
Description |
|
public setDateFrom($date = null):Carbon\Carbon
Return type: Carbon
Set the year, month, and date for this instance to that of the passed instance.
Name |
Type |
Description |
|
now if null |
public setTimeFrom($date = null):Carbon\Carbon
Return type: Carbon
Set the hour, minute, second and microseconds for this instance to that of the passed instance.
Name |
Type |
Description |
|
now if null |
public static getDays():array
Get the days of the week
public static getWeekStartsAt():int
Get the first day of week
public static setWeekStartsAt($day):void
Name |
Type |
Description |
|
week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). |
public static getWeekEndsAt():int
Get the last day of week
public static setWeekEndsAt($day):void
Name |
Type |
Description |
|
week end day (or 'auto' to get the day before the first day of week from Carbon::getLocale() culture). |
public static getWeekendDays():array
Get weekend days
public static setWeekendDays($days):void
Name |
Type |
Description |
|
public static hasRelativeKeywords($time):bool
Determine if a time string will produce a relative date.
Name |
Type |
Description |
|
public static setUtf8($utf8):void
Name |
Type |
Description |
|
public formatLocalized($format):string
Format the instance with the current locale. You can set the current locale using setlocale() https://php.net/setlocale.
Name |
Type |
Description |
|
public startOfDay():Carbon\Carbon
Return type: Carbon
Resets the time to 23:59:59.999999 end of day
public startOfMonth():Carbon\Carbon
Return type: Carbon
Resets the date to the first day of the month and the time to 00:00:00
public endOfMonth():Carbon\Carbon
Return type: Carbon
Resets the date to end of the month and time to 23:59:59.999999
public startOfQuarter():Carbon\Carbon
Return type: Carbon
Resets the date to the first day of the quarter and the time to 00:00:00
public endOfQuarter():Carbon\Carbon
Return type: Carbon
Resets the date to end of the quarter and time to 23:59:59.999999
public startOfYear():Carbon\Carbon
Return type: Carbon
Resets the date to the first day of the year and the time to 00:00:00
public endOfYear():Carbon\Carbon
Return type: Carbon
Resets the date to end of the year and time to 23:59:59.999999
public startOfDecade():Carbon\Carbon
Return type: Carbon
Resets the date to the first day of the decade and the time to 00:00:00
public endOfDecade():Carbon\Carbon
Return type: Carbon
Resets the date to end of the decade and time to 23:59:59.999999
public startOfCentury():Carbon\Carbon
Return type: Carbon
Resets the date to the first day of the century and the time to 00:00:00
public endOfCentury():Carbon\Carbon
Return type: Carbon
Resets the date to end of the century and time to 23:59:59.999999
public startOfWeek($weekStartsAt = null):Carbon\Carbon
Return type: Carbon
Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00
Name |
Type |
Description |
|
optional start allow you to specify the day of week to use to start the week |
public endOfWeek($weekEndsAt = null):Carbon\Carbon
Return type: Carbon
Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999
Name |
Type |
Description |
|
optional start allow you to specify the day of week to use to end the week |
public startOfHour():Carbon\Carbon
Return type: Carbon
Modify to start of current hour, minutes and seconds become 0
public endOfHour():Carbon\Carbon
Return type: Carbon
Modify to end of current hour, minutes and seconds become 59
public startOfMinute():Carbon\Carbon
Return type: Carbon
Modify to start of current minute, seconds become 0
public endOfMinute():Carbon\Carbon
Return type: Carbon
Modify to end of current minute, seconds become 59
public eq($date):bool
Determines if the instance is equal to another
Name |
Type |
Description |
|
public equalTo($date):bool
Determines if the instance is equal to another
Name |
Type |
Description |
|
public ne($date):bool
Determines if the instance is not equal to another
Name |
Type |
Description |
|
public notEqualTo($date):bool
Determines if the instance is not equal to another
Name |
Type |
Description |
|
public gt($date):bool
Determines if the instance is greater (after) than another
Name |
Type |
Description |
|
public greaterThan($date):bool
Determines if the instance is greater (after) than another
Name |
Type |
Description |
|
public gte($date):bool
Determines if the instance is greater (after) than or equal to another
Name |
Type |
Description |
|
public greaterThanOrEqualTo($date):bool
Determines if the instance is greater (after) than or equal to another
Name |
Type |
Description |
|
public lt($date):bool
Determines if the instance is less (before) than another
Name |
Type |
Description |
|
public lessThan($date):bool
Determines if the instance is less (before) than another
Name |
Type |
Description |
|
public lte($date):bool
Determines if the instance is less (before) or equal to another
Name |
Type |
Description |
|
public lessThanOrEqualTo($date):bool
Determines if the instance is less (before) or equal to another
Name |
Type |
Description |
|
public between($date1, $date2, $equal = true):bool
Determines if the instance is between two others.
Name |
Type |
Description |
|
||
|
||
|
Indicates if an equal to comparison should be done |
public isWeekday():bool
Determines if the instance is a weekday.
public isWeekend():bool
Determines if the instance is a weekend day.
public isYesterday():bool
Determines if the instance is yesterday.
public isToday():bool
Determines if the instance is today.
public isTomorrow():bool
Determines if the instance is tomorrow.
public isFuture():bool
Determines if the instance is in the future, ie. greater (after) than now.
public isPast():bool
Determines if the instance is in the past, ie. less (before) than now.
public isLeapYear():bool
Determines if the instance is a leap year.
public isLongYear():bool
Determines if the instance is a long year (using calendar year).
public isSameAs($format, $date = null):bool
Compares the formatted values of the two dates.
Name |
Type |
Description |
|
date formats to compare. |
|
|
instance to compare with or null to use current day. |
public isSameQuarter($date = null, $ofSameYear = true):bool
Checks if the passed in date is in the same quarter as the instance quarter (and year if needed).
Name |
Type |
Description |
|
The instance to compare with or null to use current day. |
|
|
Check if it is the same month in the same year. |
public isSameMonth($date = null, $ofSameYear = true):bool
Checks if the passed in date is in the same month as the instance´s month.
Name |
Type |
Description |
|
The instance to compare with or null to use the current date. |
|
|
Check if it is the same month in the same year. |
public isDayOfWeek($dayOfWeek):bool
Checks if this day is a specific day of the week.
Name |
Type |
Description |
|
public isBirthday($date = null):bool
Check if its the birthday. Compares the date/month values of the two dates.
Name |
Type |
Description |
|
The instance to compare with or null to use current day. |
public isLastOfMonth():bool
Check if today is the last day of the Month
public static hasFormat($date, $format):bool
Checks if the (date)time string is in a given format.
Name |
Type |
Description |
|
||
|
public toDateString():string
Format the instance as date
public toFormattedDateString():string
Format the instance as a readable date
public toTimeString($unitPrecision = "second"):string
Format the instance as time
Name |
Type |
Description |
|
public toDateTimeString($unitPrecision = "second"):string
Format the instance as date and time
Name |
Type |
Description |
|
public toDayDateTimeString():string
Format the instance with day, date and time
public toAtomString():string
Format the instance as ATOM
Format the instance as COOKIE
public toIso8601String():string
Format the instance as ISO8601
public toRfc822String():string
Format the instance as RFC822
public toIso8601ZuluString($unitPrecision = "second"):string
Convert the instance to UTC and return as Zulu ISO8601
Name |
Type |
Description |
|
public toRfc850String():string
Format the instance as RFC850
public toRfc1036String():string
Format the instance as RFC1036
public toRfc1123String():string
Format the instance as RFC1123
public toRfc2822String():string
Format the instance as RFC2822
public toRfc3339String($extended = false):string
Format the instance as RFC3339
Name |
Type |
Description |
|
public toRssString():string
Format the instance as RSS
public toW3cString():string
Format the instance as W3C
public toRfc7231String():string
Format the instance as RFC7231
public toArray():array
Get default array representation.
public static resetToStringFormat():void
Reset the format used to the default when type juggling a Carbon instance to a string
public static setToStringFormat($format):void
Name |
Type |
Description |
|
public static instance($date):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from a DateTime one.
Name |
Type |
Description |
|
public static parse($time = null, $tz = null):Carbon\Carbon
Return type: Carbon
Create a carbon instance from a string.
Name |
Type |
Description |
|
||
|
public static now($tz = null):Carbon\Carbon
Return type: Carbon
Get a Carbon instance for the current date and time.
Name |
Type |
Description |
|
public static today($tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance for today.
Name |
Type |
Description |
|
public static tomorrow($tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance for tomorrow.
Name |
Type |
Description |
|
public static yesterday($tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance for yesterday.
Name |
Type |
Description |
|
public static maxValue():Carbon\Carbon
Return type: Carbon
Create a Carbon instance for the greatest supported date.
public static minValue():Carbon\Carbon
Return type: Carbon
Create a Carbon instance for the lowest supported date.
public static create($year, $month = 1, $day = 1, $hour, $minute, $second, $tz = null):Carbon\Carbon
Return type: Carbon
Create a new Carbon instance from a specific date and time.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
public static createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null):Carbon\Carbon
Return type: Carbon
Create a new safe Carbon instance from a specific date and time.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
public static createFromDate($year = null, $month = null, $day = null, $tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from just a date. The time portion is set to now.
Name |
Type |
Description |
|
||
|
||
|
||
|
public static createMidnightDate($year = null, $month = null, $day = null, $tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from just a date. The time portion is set to midnight.
Name |
Type |
Description |
|
||
|
||
|
||
|
public static createFromTime($hour, $minute, $second, $tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from just a time. The date portion is set to today.
Name |
Type |
Description |
|
||
|
||
|
||
|
public static createFromTimeString($time, $tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from a time string. The date portion is set to today.
Name |
Type |
Description |
|
||
|
public diffInYears($date = null, $absolute = true):int
Get the difference in years
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInMonths($date = null, $absolute = true):int
Get the difference in months rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInWeeks($date = null, $absolute = true):int
Get the difference in weeks rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInDays($date = null, $absolute = true):int
Get the difference in days rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInWeekdays($date = null, $absolute = true):int
Get the difference in weekdays rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInWeekendDays($date = null, $absolute = true):int
Get the difference in weekend days using a filter rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInHours($date = null, $absolute = true):int
Get the difference in hours rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInRealHours($date = null, $absolute = true):int
Get the difference in hours rounded down using timestamps.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInMinutes($date = null, $absolute = true):int
Get the difference in minutes rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInRealMinutes($date = null, $absolute = true):int
Get the difference in minutes rounded down using timestamps.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInSeconds($date = null, $absolute = true):int
Get the difference in seconds rounded down.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public diffInRealSeconds($date = null, $absolute = true):int
Get the difference in seconds using timestamps.
Name |
Type |
Description |
|
||
|
Get the absolute of the difference |
public secondsSinceMidnight():int
The number of seconds since midnight.
public secondsUntilEndOfDay():int
The number of seconds until 23:59:59.
public diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null):string
Get the difference in a human readable format in the current locale from current instance to an other instance given (or now if null given).
Name |
Type |
Description |
|
if array passed, will be used as parameters array, see $syntax below; if null passed, now will be used as comparison reference; if any other type, it will be converted to date and used as reference. |
|
|
if array passed, parameters will be extracted from it, the array may contains: - 'syntax' entry (see below) - 'short' entry (see below) - 'parts' entry (see below) - 'options' entry (see below) - 'skip' entry, list of units to skip (array of strings or a single string, ` it can be the unit name (singular or plural) or its shortcut ` (y, m, w, d, h, min, s, ms, µs). - 'aUnit' entry, prefer "an hour" over "1 hour" if true - 'join' entry determines how to join multiple parts of the string ` - if $join is a string, it’s used as a joiner glue ` - if $join is a callable/closure, it get the list of string and should return a string ` - if $join is an array, the first item will be the default glue, and the second item ` will be used instead of the glue for the last item ` - if $join is true, it will be guessed from the locale ('list' translation file entry) ` - if $join is missing, a space will be used as glue - 'other' entry (see above) - 'minimumUnit' entry determines the smallest unit of time to display can be long or ` short form of the units, e.g. 'hour' or 'h' (default value: s) if int passed, it add modifiers: Possible values: - CarbonInterface::DIFF_ABSOLUTE no modifiers - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier Default value: CarbonInterface::DIFF_ABSOLUTE |
|
|
displays short format of time units |
|
|
maximum number of parts to display (default value: 1: single unit) |
|
|
human diff options |
public static macro($name, $macro):void
Register a custom macro.
Name |
Type |
Description |
|
||
|
public static hasMacro($name):bool
Checks if macro is registered globally.
Name |
Type |
Description |
|
public static getMidDayAt():int
get midday/noon hour
public static setMidDayAt($hour):void
Name |
Type |
Description |
|
midday hour |
public midDay():Carbon\Carbon
Return type: Carbon
Modify to midday, default to self::$midDayAt
public next($modifier = null):Carbon\Carbon
Return type: Carbon
Modify to the next occurrence of a given modifier such as a day of the week. If no modifier is provided, modify to the next occurrence of the current day of the week. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
public nextWeekday():Carbon\Carbon
Return type: Carbon
Go backward to the previous weekend day.
public previous($modifier = null):Carbon\Carbon
Return type: Carbon
Modify to the previous occurrence of a given modifier such as a day of the week. If no dayOfWeek is provided, modify to the previous occurrence of the current day of the week. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
public firstOfMonth($dayOfWeek = null):Carbon\Carbon
Return type: Carbon
Modify to the first occurrence of a given day of the week in the current month. If no dayOfWeek is provided, modify to the first day of the current month. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
public lastOfMonth($dayOfWeek = null):Carbon\Carbon
Return type: Carbon
Modify to the last occurrence of a given day of the week in the current month. If no dayOfWeek is provided, modify to the last day of the current month. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
public nthOfMonth($nth, $dayOfWeek):void
Modify to the given occurrence of a given day of the week in the current month. If the calculated occurrence is outside the scope of the current month, then return false and no modifications are made.
Name |
Type |
Description |
|
||
|
public firstOfQuarter($dayOfWeek = null):Carbon\Carbon
Return type: Carbon
Modify to the first occurrence of a given day of the week in the current quarter. If no dayOfWeek is provided, modify to the first day of the current quarter. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
day of the week default null |
public lastOfQuarter($dayOfWeek = null):Carbon\Carbon
Return type: Carbon
Modify to the last occurrence of a given day of the week in the current quarter. If no dayOfWeek is provided, modify to the last day of the current quarter. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
day of the week default null |
public nthOfQuarter($nth, $dayOfWeek):void
Modify to the given occurrence of a given day of the week in the current quarter. If the calculated occurrence is outside the scope of the current quarter, then return false and no modifications are made.
Name |
Type |
Description |
|
||
|
public firstOfYear($dayOfWeek = null):Carbon\Carbon
Return type: Carbon
Modify to the first occurrence of a given day of the week in the current year. If no dayOfWeek is provided, modify to the first day of the current year. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
day of the week default null |
public lastOfYear($dayOfWeek = null):Carbon\Carbon
Return type: Carbon
Modify to the last occurrence of a given day of the week in the current year. If no dayOfWeek is provided, modify to the last day of the current year. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.
Name |
Type |
Description |
|
day of the week default null |
public nthOfYear($nth, $dayOfWeek):void
Modify to the given occurrence of a given day of the week in the current year. If the calculated occurrence is outside the scope of the current year, then return false and no modifications are made.
Name |
Type |
Description |
|
||
|
public average($date = null):Carbon\Carbon
Return type: Carbon
Modify the current instance to the average of a given instance (default now) and the current instance (second-precision).
Name |
Type |
Description |
|
public closest($date1, $date2):Carbon\Carbon
Return type: Carbon
Get the closest date from the instance (second-precision).
Name |
Type |
Description |
|
||
|
public farthest($date1, $date2):Carbon\Carbon
Return type: Carbon
Get the farthest date from the instance (second-precision).
Name |
Type |
Description |
|
||
|
public min($date = null):Carbon\Carbon
Return type: Carbon
Get the minimum instance between a given instance (default now) and the current instance.
Name |
Type |
Description |
|
public minimum($date = null):Carbon\Carbon
Return type: Carbon
Get the minimum instance between a given instance (default now) and the current instance.
Name |
Type |
Description |
|
public max($date = null):Carbon\Carbon
Return type: Carbon
Get the maximum instance between a given instance (default now) and the current instance.
Name |
Type |
Description |
|
public maximum($date = null):Carbon\Carbon
Return type: Carbon
Get the maximum instance between a given instance (default now) and the current instance.
Name |
Type |
Description |
|
public static useMonthsOverflow($monthsOverflow = true):void
Name |
Type |
Description |
|
public static resetMonthsOverflow():void
public static shouldOverflowMonths():bool
Get the month overflow global behavior (can be overridden in specific instances).
public static useYearsOverflow($yearsOverflow = true):void
Name |
Type |
Description |
|
public static resetYearsOverflow():void
public static shouldOverflowYears():bool
Get the month overflow global behavior (can be overridden in specific instances).
public static setHumanDiffOptions($humanDiffOptions):void
Name |
Type |
Description |
|
public static enableHumanDiffOption($humanDiffOption):void
Name |
Type |
Description |
|
public static disableHumanDiffOption($humanDiffOption):void
Name |
Type |
Description |
|
public static getHumanDiffOptions():int
Return default humanDiff() options (merged flags as integer).
public serialize():string
Return a serialized string of the instance.
public static fromSerialized($value):Carbon\Carbon
Return type: Carbon
Create an instance from a serialized string.
Name |
Type |
Description |
|
public jsonSerialize():void
Prepare the object for JSON serialization.
public static serializeUsing($callback):void
Name |
Type |
Description |
|
public static createFromTimestamp($timestamp, $tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from a timestamp and set the timezone (use default one if not specified).
Name |
Type |
Description |
|
||
|
public static createFromTimestampUTC($timestamp):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from an timestamp keeping the timezone to UTC.
Name |
Type |
Description |
|
public static createFromTimestampMs($timestamp, $tz = null):Carbon\Carbon
Return type: Carbon
Create a Carbon instance from a timestamp in milliseconds.
Name |
Type |
Description |
|
||
|
public timestamp($unixTimestamp):Carbon\Carbon
Return type: Carbon
Set the instance's timestamp.
Name |
Type |
Description |
|
public isSunday():bool
Checks if the instance day is sunday.
public isMonday():bool
Checks if the instance day is monday.
public isTuesday():bool
Checks if the instance day is tuesday.
public isWednesday():bool
Checks if the instance day is wednesday.
public isThursday():bool
Checks if the instance day is thursday.
public isFriday():bool
Checks if the instance day is friday.
public isSaturday():bool
Checks if the instance day is saturday.
public isSameYear($date = null):bool
Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
Name |
Type |
Description |
|
public isCurrentYear():bool
Checks if the instance is in the same year as the current moment.
public isNextYear():bool
Checks if the instance is in the same year as the current moment next year.
public isLastYear():bool
Checks if the instance is in the same year as the current moment last year.
public isNextWeek():bool
Checks if the instance is in the same week as the current moment next week.
public isLastWeek():bool
Checks if the instance is in the same week as the current moment last week.
public isSameDay($date = null):bool
Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
Name |
Type |
Description |
|
public isCurrentMonth():bool
Checks if the instance is in the same month as the current moment.
public isNextMonth():bool
Checks if the instance is in the same month as the current moment next month.
public isLastMonth():bool
Checks if the instance is in the same month as the current moment last month.
public isCurrentQuarter():bool
Checks if the instance is in the same quarter as the current moment.
public isNextQuarter():bool
Checks if the instance is in the same quarter as the current moment next quarter.
public isLastQuarter():bool
Checks if the instance is in the same quarter as the current moment last quarter.
public year($value):Carbon
Set current instance year to the given value.
Name |
Type |
Description |
|
public month($value):Carbon
Set current instance month to the given value.
Name |
Type |
Description |
|
public day($value):Carbon
Set current instance day to the given value.
Name |
Type |
Description |
|
public hour($value):Carbon
Set current instance hour to the given value.
Name |
Type |
Description |
|
public minute($value):Carbon
Set current instance minute to the given value.
Name |
Type |
Description |
|
public second($value):Carbon
Set current instance second to the given value.
Name |
Type |
Description |
|
public addYears($value = 1):Carbon
Add years (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addYear():Carbon
Add one year to the instance (using date interval).
public subYears($value = 1):Carbon
Sub years (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subYear():Carbon
Sub one year to the instance (using date interval).
public addYearsWithOverflow($value = 1):Carbon
Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
Name |
Type |
Description |
|
public addYearWithOverflow():Carbon
Add one year to the instance (using date interval) with overflow explicitly allowed.
public subYearsWithOverflow($value = 1):Carbon
Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
Name |
Type |
Description |
|
public subYearWithOverflow():Carbon
Sub one year to the instance (using date interval) with overflow explicitly allowed.
public addYearsNoOverflow($value = 1):Carbon
Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
Name |
Type |
Description |
|
public addYearNoOverflow():Carbon
Add one year to the instance (using date interval) with overflow explicitly forbidden.
public subYearsNoOverflow($value = 1):Carbon
Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
Name |
Type |
Description |
|
public subYearNoOverflow():Carbon
Sub one year to the instance (using date interval) with overflow explicitly forbidden.
public addMonths($value = 1):Carbon
Add months (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addMonth():Carbon
Add one month to the instance (using date interval).
public subMonths($value = 1):Carbon
Sub months (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subMonth():Carbon
Sub one month to the instance (using date interval).
public addMonthsWithOverflow($value = 1):Carbon
Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
Name |
Type |
Description |
|
public addMonthWithOverflow():Carbon
Add one month to the instance (using date interval) with overflow explicitly allowed.
public subMonthsWithOverflow($value = 1):Carbon
Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
Name |
Type |
Description |
|
public subMonthWithOverflow():Carbon
Sub one month to the instance (using date interval) with overflow explicitly allowed.
public addMonthsNoOverflow($value = 1):Carbon
Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
Name |
Type |
Description |
|
public addMonthNoOverflow():Carbon
Add one month to the instance (using date interval) with overflow explicitly forbidden.
public subMonthsNoOverflow($value = 1):Carbon
Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
Name |
Type |
Description |
|
public subMonthNoOverflow():Carbon
Sub one month to the instance (using date interval) with overflow explicitly forbidden.
public addDays($value = 1):Carbon
Add days (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addDay():Carbon
Add one day to the instance (using date interval).
public subDays($value = 1):Carbon
Sub days (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subDay():Carbon
Sub one day to the instance (using date interval).
public addHours($value = 1):Carbon
Add hours (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addHour():Carbon
Add one hour to the instance (using date interval).
public subHours($value = 1):Carbon
Sub hours (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subHour():Carbon
Sub one hour to the instance (using date interval).
public addMinutes($value = 1):Carbon
Add minutes (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addMinute():Carbon
Add one minute to the instance (using date interval).
public subMinutes($value = 1):Carbon
Sub minutes (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subMinute():Carbon
Sub one minute to the instance (using date interval).
public addSeconds($value = 1):Carbon
Add seconds (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addSecond():Carbon
Add one second to the instance (using date interval).
public subSeconds($value = 1):Carbon
Sub seconds (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subSecond():Carbon
Sub one second to the instance (using date interval).
public addCenturies($value = 1):Carbon
Add centuries (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addCentury():Carbon
Add one century to the instance (using date interval).
public subCenturies($value = 1):Carbon
Sub centuries (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subCentury():Carbon
Sub one century to the instance (using date interval).
public addQuarters($value = 1):Carbon
Add quarters (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addQuarter():Carbon
Add one quarter to the instance (using date interval).
public subQuarters($value = 1):Carbon
Sub quarters (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subQuarter():Carbon
Sub one quarter to the instance (using date interval).
public addWeeks($value = 1):Carbon
Add weeks (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addWeek():Carbon
Add one week to the instance (using date interval).
public subWeeks($value = 1):Carbon
Sub weeks (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subWeek():Carbon
Sub one week to the instance (using date interval).
public addWeekdays($value = 1):Carbon
Add weekdays (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public addWeekday():Carbon
Add one weekday to the instance (using date interval).
public subWeekdays($value = 1):Carbon
Sub weekdays (the $value count passed in) to the instance (using date interval).
Name |
Type |
Description |
|
public subWeekday():Carbon
Sub one weekday to the instance (using date interval).
public addRealSeconds($value = 1):Carbon
Add seconds (the $value count passed in) to the instance (using timestamp).
Name |
Type |
Description |
|
public addRealSecond():Carbon
Add one second to the instance (using timestamp).
public subRealSeconds($value = 1):Carbon
Sub seconds (the $value count passed in) to the instance (using timestamp).
Name |
Type |
Description |
|
public subRealSecond():Carbon
Sub one second to the instance (using timestamp).
public addRealMinutes($value = 1):Carbon
Add minutes (the $value count passed in) to the instance (using timestamp).
Name |
Type |
Description |
|
public addRealMinute():Carbon
Add one minute to the instance (using timestamp).
public subRealMinutes($value = 1):Carbon
Sub minutes (the $value count passed in) to the instance (using timestamp).
Name |
Type |
Description |
|
public subRealMinute():Carbon
Sub one minute to the instance (using timestamp).
public addRealHours($value = 1):Carbon
Add hours (the $value count passed in) to the instance (using timestamp).
Name |
Type |
Description |
|
public addRealHour():Carbon
Add one hour to the instance (using timestamp).
public subRealHours($value = 1):Carbon
Sub hours (the $value count passed in) to the instance (using timestamp).
Name |
Type |
Description |
|
public subRealHour():Carbon
Sub one hour to the instance (using timestamp).