Utilizamos cookies propias y de terceros para fines analíticos y para mostrarte publicidad personalizada en base a un perfil elaborado a partir de tus hábitos de navegación (por ejemplo, páginas visitadas). Para más información consulta nuestra
Política de Cookies
Puedes aceptar, rechazar o configurar las cookies pulsando algunos de los siguientes botones:
Utilizamos Cookies propias y de terceros para recopilar información para mejorar nuestros servicios y para análisis de tus hábitos de navegación. Si continuas navegando, supone la aceptación de la instalación de las mismas. Puedes configurar tu navegador para impedir su instalación.
Cookies necesarias
Siempre activo
Estas cookies son extrictamente necesarias para el funcionamiento de la página, las puede desactivar cambiando la configuración de su navegador pero no podrá usar la página con normalidad.
Cookies usadas
Cookies funcionales
Estas cookies proveen información necesarias a aplicaciones de la propia web o integradas de terceros, si las inhabilita puede que encuentre algunos problemas de funcionarmiento en la página.
Cookies usadas
Se informa al usuario de que tiene la posibilidad de configurar su navegador de modo que se le informe de la recepción de cookies, pudiendo, si así lo desea, impedir que sean instaladas en su disco duro.
A continuación le proporcionamos los enlaces de diversos navegadores, a través de los cuales podrá realizar dicha configuración:
⧉final public __construct(string $name, string $value = '', array $options = array()) Construct a new Cookie instance.
/**
* Construct a new Cookie instance.
*
* @param string $name The cookie's name
* @param string $value The cookie's value
* @param array<string, mixed> $options The cookie's options
*
* @throws CookieException
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:201
⧉public getId(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:248
⧉public getPrefix(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:256
⧉public getName(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:264
⧉public getPrefixedName(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:272
⧉public getValue(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:291
⧉public getExpiresTimestamp(): int {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:299
⧉public getExpiresString(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:307
⧉public isExpired(): bool {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:315
⧉public getMaxAge(): int {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:323
⧉public getPath(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:333
⧉public getDomain(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:341
⧉public isSecure(): bool {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:349
⧉public isHTTPOnly(): bool {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:357
⧉public getSameSite(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:365
⧉public isRaw(): bool {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:373
⧉public getOptions(): array {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:381
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:534
⧉public withRaw(bool $raw = true) {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:548
⧉public offsetExists($offset): bool Whether an offset exists.
/**
* Whether an offset exists.
*
* @param mixed $offset
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:568
⧉public offsetGet($offset): mixed Offset to retrieve.
/**
* Offset to retrieve.
*
* @param mixed $offset
*
* @throws InvalidArgumentException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:583
⧉public offsetSet($offset, $value): void Offset to set.
/**
* Offset to set.
*
* @param mixed $offset
* @param mixed $value
*
* @throws LogicException
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:600
⧉public offsetUnset($offset): void Offset to unset.
/**
* Offset to unset.
*
* @param mixed $offset
*
* @throws LogicException
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:612
⧉public toHeaderString(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:624
⧉public __toString(): string {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:632
⧉public toArray(): array {@inheritDoc}
/**
* {@inheritDoc}
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:683
⧉protected validateName(string $name, bool $raw): void Validates the cookie name per RFC 2616.
/**
* Validates the cookie name per RFC 2616.
*
* If `$raw` is true, names should not contain invalid characters
* as `setrawcookie()` will reject this.
*
* @throws CookieException
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:731
⧉protected validatePrefix(string $prefix, bool $secure, string $path, string $domain): void Validates the special prefixes if some attribute requirements are met.
/**
* Validates the special prefixes if some attribute requirements are met.
*
* @throws CookieException
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:747
⧉protected validateSameSite(string $samesite, bool $secure): void Validates the `SameSite` to be within the allowed types.
/**
* Validates the `SameSite` to be within the allowed types.
*
* @throws CookieException
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:765
⇄⧉public static setDefaults($config = array()): array<string, mixed> The old defaults array. Useful for resetting. Set the default attributes to a Cookie instance by injecting the values from the...
/**
* Set the default attributes to a Cookie instance by injecting
* the values from the `CookieConfig` config or an array.
*
* @param array<string, mixed>|CookieConfig $config
*
* @return array<string, mixed> The old defaults array. Useful for resetting.
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:128
⇄⧉public static fromHeaderString(string $cookie, bool $raw = false): static Create a new Cookie instance from a `Set-Cookie` header.
/**
* Create a new Cookie instance from a `Set-Cookie` header.
*
* @throws CookieException
*
* @return static
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:166
⧉protected static convertExpiresTimestamp($expires0): int Converts expires time to Unix format.
/**
* Converts expires time to Unix format.
*
* @param DateTimeInterface|int|string $expires
*/
Defined in .../codeigniter4/framework/system/Cookie/Cookie.php:698
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:65
⧉public open($path, $name): bool Re-initialize existing session, or creates a new one.
/**
* Re-initialize existing session, or creates a new one.
*
* @param string $path The path where to store/retrieve the session
* @param string $name The session name
*
* @throws SessionException
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:95
⧉public read($id): false|string Returns an encoded string of the read data. Reads the session data from the session storage, and returns the results.
/**
* Reads the session data from the session storage, and returns the results.
*
* @param string $id The session ID
*
* @return false|string Returns an encoded string of the read data.
* If nothing was read, it must return false.
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:122
⧉public write($id, $data): bool Writes the session data to the session storage.
/**
* Writes the session data to the session storage.
*
* @param string $id The session ID
* @param string $data The encoded session data
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:180
⧉public close(): bool Closes the current session.
/**
* Closes the current session.
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:225
⧉public destroy($id): bool Destroys a session
/**
* Destroys a session
*
* @param string $id The session ID being destroyed
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:243
⧉public gc($max_lifetime): false|int Returns the number of deleted sessions on success, or false on failure. Cleans up expired sessions.
/**
* Cleans up expired sessions.
*
* @param int $max_lifetime Sessions that have not updated
* for the last max_lifetime seconds will be removed.
*
* @return false|int Returns the number of deleted sessions on success, or false on failure.
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:271
⧉public setLogger(Psr\Log\LoggerInterface $logger) Sets a logger.
/**
* Sets a logger.
*
* @param LoggerInterface $logger
*/
Inherited from CodeIgniter\Session\Handlers\BaseHandler
Defined in .../codeigniter4/framework/system/ThirdParty/PSR/Log/LoggerAwareTrait.php:22
⧉protected configureSessionIDRegex() Configure Session ID regular expression
/**
* Configure Session ID regular expression
*/
Defined in .../codeigniter4/framework/system/Session/Handlers/FileHandler.php:312
⧉protected destroyCookie(): bool Internal method to force removal of a cookie by the client when session_destroy(...
/**
* Internal method to force removal of a cookie by the client
* when session_destroy() is called.
*/
Inherited from CodeIgniter\Session\Handlers\BaseHandler
Defined in .../codeigniter4/framework/system/Session/Handlers/BaseHandler.php:119
⧉protected lockSession(string $sessionID): bool A dummy method allowing drivers with no locking functionality (databases other t...
/**
* A dummy method allowing drivers with no locking functionality
* (databases other than PostgreSQL and MySQL) to act as if they
* do acquire a lock.
*/
Inherited from CodeIgniter\Session\Handlers\BaseHandler
Defined in .../codeigniter4/framework/system/Session/Handlers/BaseHandler.php:133
⧉protected releaseLock(): bool Releases the lock, if any.
/**
* Releases the lock, if any.
*/
Inherited from CodeIgniter\Session\Handlers\BaseHandler
Defined in .../codeigniter4/framework/system/Session/Handlers/BaseHandler.php:143
⧉protected fail(): bool Drivers other than the 'files' one don't (need to) use the session.save_path INI...
/**
* Drivers other than the 'files' one don't (need to) use the
* session.save_path INI setting, but that leads to confusing
* error messages emitted by PHP when open() or write() fail,
* as the message contains session.save_path ...
*
* To work around the problem, the drivers will call this method
* so that the INI is set just in time for the error message to
* be properly generated.
*/
Inherited from CodeIgniter\Session\Handlers\BaseHandler
Defined in .../codeigniter4/framework/system/Session/Handlers/BaseHandler.php:160
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
new \CodeIgniter\Session\Session(SessionHandlerInterface $driver, Config\App $config)
/**
* Constructor.
*
* Extract configuration settings and save them here.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:167
⇄⧉public start(): mixed Initialize the session container and starts up the session.
$value->start()
/**
* Initialize the session container and starts up the session.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:206
⇄⧉public stop() Does a full stop of the session:
$value->stop()
/**
* Does a full stop of the session:
*
* - destroys the session
* - unsets the session id
* - destroys the session cookie
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:269
⇄⧉public regenerate(bool $destroy = false) Regenerates the session ID.
$value->regenerate(bool $destroy = false)
/**
* Regenerates the session ID.
*
* @param bool $destroy Should old session data be destroyed?
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:408
⇄⧉public destroy() Destroys the current session.
$value->destroy()
/**
* Destroys the current session.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:417
⇄⧉public set($data, $value = null) Sets user data into the session.
$value->set($data, $value = null)
/**
* Sets user data into the session.
*
* If $data is a string, then it is interpreted as a session property
* key, and $value is expected to be non-null.
*
* If $data is an array, it is expected to be an array of key/value pairs
* to be set as session properties.
*
* @param array|string $data Property name or associative array of properties
* @param mixed $value Property value if single key provided
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:438
⇄⧉public get(string $key = null): mixed The property value(s) Get user data that has been set in the session.
$value->get(string $key = null)
/**
* Get user data that has been set in the session.
*
* If the property exists as "normal", returns it.
* Otherwise, returns an array of any temp or flash data values with the
* property key.
*
* Replaces the legacy method $session->userdata();
*
* @param string|null $key Identifier of the session property to retrieve
*
* @return mixed The property value(s)
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:468
⇄⧉public has(string $key): bool Returns whether an index exists in the session array.
$value->has(string $key)
/**
* Returns whether an index exists in the session array.
*
* @param string $key Identifier of the session property we are interested in.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:501
⇄⧉public push(string $key, array $data) Push new value onto session value that is array.
$value->push(string $key, array $data)
/**
* Push new value onto session value that is array.
*
* @param string $key Identifier of the session property we are interested in.
* @param array $data value to be pushed to existing session key.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:512
⇄⧉public remove($key) Remove one or more session properties.
$value->remove($key)
/**
* Remove one or more session properties.
*
* If $key is an array, it is interpreted as an array of string property
* identifiers to remove. Otherwise, it is interpreted as the identifier
* of a specific session property to remove.
*
* @param array|string $key Identifier of the session property or properties to remove.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:528
⧉public __set(string $key, $value) Magic method to set variables in the session by simply calling $session->foo = b...
/**
* Magic method to set variables in the session by simply calling
* $session->foo = bar;
*
* @param string $key Identifier of the session property to set.
* @param array|string $value
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:548
⧉public __get(string $key): string|null Magic method to get session variables by simply calling $foo = $session->foo;
/**
* Magic method to get session variables by simply calling
* $foo = $session->foo;
*
* @param string $key Identifier of the session property to remove.
*
* @return string|null
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:561
⧉public __isset(string $key): bool Magic method to check for session variables. Different from has() in that it wil...
/**
* Magic method to check for session variables.
* Different from has() in that it will validate 'session_id' as well.
* Mostly used by internal PHP functions, users should stick to has()
*
* @param string $key Identifier of the session property to remove.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:583
⇄⧉public setFlashdata($data, $value = null) Sets data into the session that will only last for a single request. Perfect for...
$value->setFlashdata($data, $value = null)
/**
* Sets data into the session that will only last for a single request.
* Perfect for use with single-use status update messages.
*
* If $data is an array, it is interpreted as an associative array of
* key/value pairs for flashdata properties.
* Otherwise, it is interpreted as the identifier of a specific
* flashdata property, with $value containing the property value.
*
* @param array|string $data Property identifier or associative array of properties
* @param array|string $value Property value if $data is a scalar
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:600
⇄⧉public getFlashdata(string $key = null): array|null The requested property value, or an associative array of them Retrieve one or more items of flash data from the session.
$value->getFlashdata(string $key = null)
/**
* Retrieve one or more items of flash data from the session.
*
* If the item key is null, return all flashdata.
*
* @param string $key Property identifier
*
* @return array|null The requested property value, or an associative array of them
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:615
⇄⧉public keepFlashdata($key) Keeps a single piece of flash data alive for one more request.
$value->keepFlashdata($key)
/**
* Keeps a single piece of flash data alive for one more request.
*
* @param array|string $key Property identifier or array of them
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:640
⇄⧉public markAsFlashdata($key): bool Mark a session property or properties as flashdata.
$value->markAsFlashdata($key)
/**
* Mark a session property or properties as flashdata.
*
* @param array|string $key Property identifier or array of them
*
* @return bool False if any of the properties are not already set
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:652
⇄⧉public unmarkFlashdata($key) Unmark data in the session as flashdata.
$value->unmarkFlashdata($key)
/**
* Unmark data in the session as flashdata.
*
* @param mixed $key Property identifier or array of them
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:682
⇄⧉public getFlashKeys(): array Retrieve all of the keys for session data marked as flashdata.
$value->getFlashKeys()
/**
* Retrieve all of the keys for session data marked as flashdata.
*
* @return array The property names of all flashdata
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:708
⇄⧉public setTempdata($data, $value = null, int $ttl = 300) Sets new data into the session, and marks it as temporary data with a set lifesp...
$value->setTempdata($data, $value = null, int $ttl = 300)
/**
* Sets new data into the session, and marks it as temporary data
* with a set lifespan.
*
* @param array|string $data Session data key or associative array of items
* @param null $value Value to store
* @param int $ttl Time-to-live in seconds
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:733
⇄⧉public getTempdata(string $key = null): mixed Session data value or null if not found. Returns either a single piece of tempdata, or all temp data currently in the ses...
$value->getTempdata(string $key = null)
/**
* Returns either a single piece of tempdata, or all temp data currently
* in the session.
*
* @param string $key Session data key
*
* @return mixed Session data value or null if not found.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:747
⇄⧉public removeTempdata(string $key) Removes a single piece of temporary data from the session.
$value->removeTempdata(string $key)
/**
* Removes a single piece of temporary data from the session.
*
* @param string $key Session data key
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:772
⇄⧉public markAsTempdata($key, int $ttl = 300): bool Mark one of more pieces of data as being temporary, meaning that it has a set li...
$value->markAsTempdata($key, int $ttl = 300)
/**
* Mark one of more pieces of data as being temporary, meaning that
* it has a set lifespan within the session.
*
* @param array|string $key Property identifier or array of them
* @param int $ttl Time to live, in seconds
*
* @return bool False if any of the properties were not set
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:787
⇄⧉public unmarkTempdata($key) Unmarks temporary data in the session, effectively removing its lifespan and all...
$value->unmarkTempdata($key)
/**
* Unmarks temporary data in the session, effectively removing its
* lifespan and allowing it to live as long as the session does.
*
* @param array|string $key Property identifier or array of them
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:832
⇄⧉public getTempKeys(): array Retrieve the keys of all session data that have been marked as temporary data.
$value->getTempKeys()
/**
* Retrieve the keys of all session data that have been marked as temporary data.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:856
⧉protected configure() Configuration.
/**
* Configuration.
*
* Handle input binds and configuration defaults.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:285
⧉protected configureSidLength() Configure session ID length
/**
* Configure session ID length
*
* To make life easier, we used to force SHA-1 and 4 bits per
* character on everyone. And of course, someone was unhappy.
*
* Then PHP 7.1 broke backwards-compatibility because ext/session
* is such a mess that nobody wants to touch it with a pole stick,
* and the one guy who does, nobody has the energy to argue with.
*
* So we were forced to make changes, and OF COURSE something was
* going to break and now we have this pile of shit. -- Narf
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:339
⧉protected initVars() Handle temporary variables
/**
* Handle temporary variables
*
* Clears old "flash" data, marks the new one for deletion and handles
* "temp" data deletion.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:380
⧉protected setSaveHandler() Sets the driver as the session handler in PHP. Extracted for easier testing.
/**
* Sets the driver as the session handler in PHP.
* Extracted for easier testing.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:877
⧉protected startSession() Starts the session. Extracted for testing reasons.
/**
* Starts the session.
* Extracted for testing reasons.
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:886
⧉protected setCookie() Takes care of setting the cookie on the client side.
/**
* Takes care of setting the cookie on the client side.
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Session/Session.php:902
isLoggedIn
$value boolean false
currentTheme
default
config_theme
/themes/default
meta_url
https://test.ticomusica.es
meta_title
Tico Música
meta_keywords
instrumentos musicales,accesorios musicales,música España, música Portugal
meta_description
Empresa referente en distribución de instrumentos musicales y accesorios a tiendas y profesionales del sector de la música de toda España y Portugal
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[0]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[0]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[0]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[0]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[0]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[0]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[1]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[1]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[1]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[1]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[1]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[1]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[2]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[2]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[2]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[2]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[2]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[2]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[3]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[3]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[3]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[3]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[3]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[3]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
⇄⧉4 => App\Entities\Blog (9)
$value[4]
Properties (9)
Available methods (16)
⧉protected attributes -> array (10)
id => string (3) "120"
video => null
name => UTF-8 string (60) "Ticó Música distribuidor en exclusiva de BG France en España"
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[4]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[4]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[4]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[4]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[4]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[4]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
⇄⧉5 => App\Entities\Blog (9)
$value[5]
Properties (9)
Available methods (16)
⧉protected attributes -> array (10)
id => string (3) "119"
video => null
⧉name => UTF-8 string (36) "Cajones Pepote: Artesanía y Calidad"
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[5]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[5]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[5]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[5]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[5]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[5]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[6]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[6]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[6]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[6]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[6]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[6]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[7]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[7]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[7]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[7]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[7]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[7]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[8]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[8]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[8]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[8]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[8]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[8]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337
Defined in .../codeigniter4/framework/system/Database/Query.php:87
⧉public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:99
⧉public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:127
⧉public getQuery(): string Returns the final, processed query string after binding, etal has been performed...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:144
⧉public setDuration(float $start, float $end = null): $this Records the execution time of the statement using microtime(true) for it's start...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:164
⧉public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:182
⧉public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has no...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:197
⧉public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:207
⧉public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:218
⧉public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:226
⧉public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:234
⧉public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:242
⧉public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:252
⧉public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:264
⧉public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:366
⧉public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:426
⧉protected compileBinds() Escapes and inserts any binds into the finalQueryString object.
/**
* Escapes and inserts any binds into the finalQueryString object.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:274
⧉protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:312
⧉protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in .../codeigniter4/framework/system/Database/Query.php:336
⧉public connect(bool $persistent = false): mixed Connect to the database.
/**
* Connect to the database.
*
* @throws DatabaseException
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:79
⧉public reconnect() Keep or establish the connection if no queries have been sent for a length of ti...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:225
⧉public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:242
⧉public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:264
⧉public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:321
⧉public escapeLikeStringDirect($str): string|string[] Escape Like String Direct There are a few instances where MySQLi queries cannot ...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param string|string[] $str Input string
*
* @return string|string[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:348
⧉public error(): array Returns the last error code and message. Must return this format: ['code' => str...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:543
⧉public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:561
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:334
⧉public initialize(): mixed Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @throws DatabaseException
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:354
⧉public close() Close the database connection.
/**
* Close the database connection.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:428
⧉public persistentConnect(): mixed Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:448
⧉public getConnection(string $alias = null): mixed Returns the actual connection object. If both a 'read' and 'write' connection ha...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:469
⧉public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:485
⧉public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:497
⧉public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:505
⧉public getPlatform(): string The name of the platform in use (MySQLi, mssql, etc)
/**
* The name of the platform in use (MySQLi, mssql, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:513
⧉public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of the B...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:530
⧉public addTableAlias(string $table): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:542
⧉public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query Orchestrates a query against the database. Queries must use Database\Statement o...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param mixed ...$binds
*
* @return BaseResult|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:572
⧉public simpleQuery(string $sql): mixed Performs a basic query against the database. No binding or caching is performed,...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:664
⧉public transOff() Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:678
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:697
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:707
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:719
⧉public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:745
⧉public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:753
⧉public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:787
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:806
⧉public table($tableName): BaseBuilder Returns an instance of the query builder for this connection.
/**
* Returns an instance of the query builder for this connection.
*
* @param array|string $tableName
*
* @throws DatabaseException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:846
⧉public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execute ...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:873
⧉public getLastQuery(): mixed Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:902
⧉public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:910
⧉public getConnectStart(): float Returns the time we started to connect to this database in seconds with microsec...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:921
⧉public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to the d...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:932
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|string $item
*
* @return array|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:961
⧉public escapeIdentifiers($item): mixed Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param mixed $item
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1107
⧉public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1165
⧉public escape($str): mixed "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param mixed $str
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1189
/**
* Escape String
*
* @param string|string[] $str Input string
* @param bool $like Whether or not the string will be used in a LIKE condition
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1218
⧉public escapeLikeString($str): string|string[] Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param string|string[] $str
*
* @return string|string[]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1260
⧉public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not natively i...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1283
⧉public listTables(bool $constrainByPrefix = false): array|bool Returns an array of table names
/**
* Returns an array of table names
*
* @throws DatabaseException
*
* @return array|bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1321
⧉public tableExists(string $tableName): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1369
⧉public getFieldNames(string $table): array|false Fetch Field Names
/**
* Fetch Field Names
*
* @throws DatabaseException
*
* @return array|false
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1381
⧉public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1426
⧉public getFieldData(string $table): array Returns an object with field data
/**
* Returns an object with field data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1436
⧉public getIndexData(string $table): array Returns an object with key data
/**
* Returns an object with key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1446
⧉public getForeignKeyData(string $table): array Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1456
/**
* Disables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1464
/**
* Enables foreign key checks temporarily.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1474
⧉public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually executed,...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1489
⧉public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1501
⧉public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1513
⧉public __get(string $key): mixed Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return mixed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1574
⧉public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1586
⧉protected _close() Close the database connection.
/**
* Close the database connection.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:234
⧉protected execute(string $sql): mixed Executes the query against the database.
/**
* Executes the query against the database.
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:282
⧉protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:307
/**
* Platform-dependant string escape
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:329
⧉protected _listTables(bool $prefixLimit = false): string Generates the SQL for listing tables in a platform-dependent manner. Uses escape...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:372
⧉protected _listColumns(string $table = ''): string Generates a platform-specific query string so that the column names can be fetch...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:386
⧉protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:398
⧉protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @throws DatabaseException
* @throws LogicException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:431
⧉protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @throws DatabaseException
*
* @return stdClass[]
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:476
/**
* Rollback Transaction
*/
Defined in .../codeigniter4/framework/system/Database/MySQLi/Connection.php:593
⧉protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in .../codeigniter4/framework/system/Database/BaseConnection.php:1305
⧉public __construct() Merge the built-in and developer-configured filters and plugins, with preference...
/**
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
Inherited from CodeIgniter\Config\View
Defined in .../codeigniter4/framework/system/Config/View.php:93
/**
* Retrieve an environment-specific configuration setting
*
* @return mixed
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:116
⧉protected registerProperties() Provides external libraries a simple way to register one or more options into a ...
/**
* Provides external libraries a simple way to register one or more
* options into a config file.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Config\BaseConfig
Defined in .../codeigniter4/framework/system/Config/BaseConfig.php:162
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:27
⧉public locateFile(string $file, string $folder = null, string $ext = 'php'): false|string The path to the file, or false if not found. Attempts to locate a file by examining the name for a namespace and looking thro...
/**
* Attempts to locate a file by examining the name for a namespace
* and looking through the PSR-4 namespaced files that we know about.
*
* @param string $file The namespaced file to locate
* @param string|null $folder The folder within the namespace that we should look for the file.
* @param string $ext The file extension the file should have.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:42
⧉public getClassname(string $file): string Examines a file and returns the fully qualified domain name.
/**
* Examines a file and returns the fully qualified domain name.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:115
⧉public search(string $path, string $ext = 'php', bool $prioritizeApp = true): array Searches through all of the defined namespaces looking for a file. Returns an ar...
/**
* Searches through all of the defined namespaces looking for a file.
* Returns an array of all found locations for the defined file.
*
* Example:
*
* $locator->search('Config/Routes.php');
* // Assuming PSR4 namespaces include foo and bar, might return:
* [
* 'app/Modules/foo/Config/Routes.php',
* 'app/Modules/bar/Config/Routes.php',
* ]
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:168
⧉public findQualifiedNameFromPath(string $path): false|string The qualified name or false if the path is not found Find the qualified name of a file according to the namespace of the first matche...
/**
* Find the qualified name of a file according to
* the namespace of the first matched namespace path.
*
* @return false|string The qualified name or false if the path is not found
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:255
⧉public listFiles(string $path): array Scans the defined namespaces, returning a list of all files that are contained w...
/**
* Scans the defined namespaces, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:295
⧉public listNamespaceFiles(string $prefix, string $path): array Scans the provided namespace, returning a list of all files that are contained w...
/**
* Scans the provided namespace, returning a list of all files
* that are contained within the subpath specified by $path.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:326
⧉protected ensureExt(string $path, string $ext): string Ensures a extension is at the end of a filename
/**
* Ensures a extension is at the end of a filename
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:201
⧉protected getNamespaces(): array|string Return the namespace mappings we know about.
/**
* Return the namespace mappings we know about.
*
* @return array|string
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:219
⧉protected legacyLocate(string $file, string $folder = null): false|string The path to the file, or false if not found. Checks the app folder to see if the file can be found. Only for use with filenam...
/**
* Checks the app folder to see if the file can be found.
* Only for use with filenames that DO NOT include namespacing.
*
* @return false|string The path to the file, or false if not found.
*/
Defined in .../codeigniter4/framework/system/Autoloader/FileLocator.php:360
/**
* Constructor.
*
* @param \Config\Logger $config
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:119
⧉public emergency($message, array $context = array()): bool System is unusable.
/**
* System is unusable.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:157
⧉public alert($message, array $context = array()): bool Action must be taken immediately.
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:170
⧉public error($message, array $context = array()): bool Runtime errors that do not require immediate action but should typically be logg...
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:193
⧉public warning($message, array $context = array()): bool Exceptional occurrences that are not errors.
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:206
⧉public notice($message, array $context = array()): bool Normal but significant events.
/**
* Normal but significant events.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:216
/**
* Detailed debug information.
*
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:238
⧉public log($level, $message, array $context = array()): bool Logs with an arbitrary level.
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:249
⧉public determineFile(): array Determines the file and line that the logging call was made from by analyzing th...
/**
* Determines the file and line that the logging call
* was made from by analyzing the backtrace.
* Find the earliest stack frame that is part of our logging system.
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:377
⧉protected interpolate($message, array $context = array()): mixed Replaces any placeholders in the message with variables from the context, as wel...
/**
* Replaces any placeholders in the message with variables
* from the context, as well as a few special items like:
*
* {session_vars}
* {post_vars}
* {get_vars}
* {env}
* {env:foo}
* {file}
* {line}
*
* @param mixed $message
*
* @return mixed
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:319
⧉protected cleanFileNames(string $file): string Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH with the ...
/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*/
Defined in .../codeigniter4/framework/system/Log/Logger.php:425
Defined in .../codeigniter4/framework/system/View/View.php:137
⧉public render(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a file name and any data that has already been set.
/**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:163
⧉public renderString(string $view, array $options = null, bool $saveData = null): string Builds the output based upon a string and any data that has already been set. Ca...
/**
* Builds the output based upon a string and any
* data that has already been set.
* Cache does not apply, because there is no "key".
*
* @param string $view The view contents
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/
Defined in .../codeigniter4/framework/system/View/View.php:276
⧉public excerpt(string $string, int $length = 20): string Extract first bit of a long string and add ellipsis
/**
* Extract first bit of a long string and add ellipsis
*/
Defined in .../codeigniter4/framework/system/View/View.php:303
⧉public setData(array $data = array(), string $context = null): CodeIgniter\View\RendererInterface Sets several pieces of view data at once.
/**
* Sets several pieces of view data at once.
*
* @param string $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:314
⧉public setVar(string $name, $value = null, string $context = null): CodeIgniter\View\RendererInterface Sets a single piece of view data.
/**
* Sets a single piece of view data.
*
* @param mixed $value
* @param string|null $context The context to escape it for: html, css, js, url
* If null, no escaping will happen
*/
Defined in .../codeigniter4/framework/system/View/View.php:333
⧉public resetData(): CodeIgniter\View\RendererInterface Removes all of the view data from the system.
/**
* Removes all of the view data from the system.
*/
Defined in .../codeigniter4/framework/system/View/View.php:348
⧉public getData(): array Returns the current data that will be displayed in the view.
/**
* Returns the current data that will be displayed in the view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:358
⧉public extend(string $layout) Specifies that the current view should extend an existing layout.
/**
* Specifies that the current view should extend an existing layout.
*/
Defined in .../codeigniter4/framework/system/View/View.php:366
⧉public section(string $name) Starts holds content for a section within the layout.
/**
* Starts holds content for a section within the layout.
*
* @param string $name Section name
*/
Defined in .../codeigniter4/framework/system/View/View.php:376
⧉public endSection() Captures the last section
/**
* Captures the last section
*
* @throws RuntimeException
*/
Defined in .../codeigniter4/framework/system/View/View.php:390
⧉public renderSection(string $sectionName) Renders a section's contents.
/**
* Renders a section's contents.
*/
Defined in .../codeigniter4/framework/system/View/View.php:411
⧉public include(string $view, array $options = null, $saveData = true): string Used within layout views to include additional views.
/**
* Used within layout views to include additional views.
*
* @param bool $saveData
*/
Defined in .../codeigniter4/framework/system/View/View.php:430
⧉public getPerformanceData(): array Returns the performance data that might have been collected during the execution...
/**
* Returns the performance data that might have been collected
* during the execution. Used primarily in the Debug Toolbar.
*/
Defined in .../codeigniter4/framework/system/View/View.php:439
⧉protected logPerformance(float $start, float $end, string $view) Logs performance data for rendering a view.
/**
* Logs performance data for rendering a view.
*/
Defined in .../codeigniter4/framework/system/View/View.php:447
/**
* Runs the validation process, returning true/false determining whether
* validation was successful or not.
*
* @param array|null $data The array of data to validate.
* @param string|null $group The predefined group of rules to apply.
* @param string|null $dbGroup The database group to use.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:108
⧉public check($value, string $rule, array $errors = array()): bool Runs the validation process, returning true or false determining whether validat...
/**
* Runs the validation process, returning true or false
* determining whether validation was successful or not.
*
* @param mixed $value
* @param string[] $errors
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:165
⧉public withRequest(CodeIgniter\HTTP\RequestInterface $request): CodeIgniter\Validation\ValidationInterface Takes a Request object and grabs the input data to use from its array values.
/**
* Takes a Request object and grabs the input data to use from its
* array values.
*
* @param IncomingRequest|RequestInterface $request
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:313
⧉public setRule(string $field, string $label, string $rules, array $errors = array()): $this Sets an individual rule and custom error messages for a single field.
/**
* Sets an individual rule and custom error messages for a single field.
*
* The custom error message should be just the messages that apply to
* this field, like so:
*
* [
* 'rule' => 'message',
* 'rule' => 'message'
* ]
*
* @return $this
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:346
⧉public setRules(array $rules, array $errors = array()): CodeIgniter\Validation\ValidationInterface Stores the rules that should be used to validate the items. Rules should be an a...
/**
* Stores the rules that should be used to validate the items.
* Rules should be an array formatted like:
*
* [
* 'field' => 'rule1|rule2'
* ]
*
* The $errors array should be formatted like:
* [
* 'field' => [
* 'rule' => 'message',
* 'rule' => 'message
* ],
* ]
*
* @param array $errors // An array of custom error messages
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:378
⧉public getRules(): array Returns all of the rules currently defined.
/**
* Returns all of the rules currently defined.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:403
⧉public hasRule(string $field): bool Checks to see if the rule for key $field has been set or not.
/**
* Checks to see if the rule for key $field has been set or not.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:411
⧉public getRuleGroup(string $group): array Get rule group.
/**
* Get rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*
* @return string[] Rule group.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:425
⧉public setRuleGroup(string $group) Set rule group.
/**
* Set rule group.
*
* @param string $group Group.
*
* @throws InvalidArgumentException If group not found.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:445
⧉public listErrors(string $template = 'list'): string Returns the rendered HTML of the errors as defined in $template.
/**
* Returns the rendered HTML of the errors as defined in $template.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:459
⧉public showError(string $field, string $template = 'single'): string Displays a single error in formatted HTML as defined in the $template view.
/**
* Displays a single error in formatted HTML as defined in the $template view.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:473
⧉public loadRuleGroup(string $group = null): array|ValidationException|null Loads custom rule groups (if set) into the current rules.
/**
* Loads custom rule groups (if set) into the current rules.
*
* Rules can be pre-defined in Config\Validation and can
* be any name, but must all still be an array of the
* same format used with setRules(). Additionally, check
* for {group}_errors for an array of custom error messages.
*
* @return array|ValidationException|null
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:513
⧉public hasError(string $field): bool Checks to see if an error exists for the given field.
/**
* Checks to see if an error exists for the given field.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:589
⧉public getError(string $field = null): string Returns the error(s) for a specified $field (or empty string if not set).
/**
* Returns the error(s) for a specified $field (or empty string if not
* set).
*
* @param string $field Field.
*
* @return string Error(s).
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:602
⧉public getErrors(): array Returns the array of errors that were encountered during a run() call. The array...
/**
* Returns the array of errors that were encountered during
* a run() call. The array should be in the following format:
*
* [
* 'field1' => 'error message',
* 'field2' => 'error message',
* ]
*
* @return array<string,string>
*
* Excluded from code coverage because that it always run as cli
*
* @codeCoverageIgnore
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:626
⧉public setError(string $field, string $error): CodeIgniter\Validation\ValidationInterface Sets the error for a specific field. Used by custom validation methods.
/**
* Sets the error for a specific field. Used by custom validation methods.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:641
⧉public reset(): CodeIgniter\Validation\ValidationInterface Resets the class to a blank slate. Should be called whenever you need to process...
/**
* Resets the class to a blank slate. Should be called whenever
* you need to process more than one array.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:717
⧉protected processRules(string $field, string $label, $value, $rules = null, array $data = null): bool Runs all of $rules against $field, until one fails, or all of them have been pro...
/**
* Runs all of $rules against $field, until one fails, or
* all of them have been processed. If one fails, it adds
* the error to $this->errors and moves on to the next,
* so that we can collect all of the first errors.
*
* @param array|string $value
* @param array|null $rules
* @param array $data
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:182
⧉protected loadRuleSets() Loads all of the rulesets classes that have been defined in the Config\Validatio...
/**
* Loads all of the rulesets classes that have been defined in the
* Config\Validation and stores them locally so we can use them.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:492
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:555
/**
* Attempts to find the appropriate error message
*
* @param string $param
* @param string $value The value that caused the validation to fail.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:654
⧉protected splitRules(string $rules): array Split rules string by pipe operator.
/**
* Split rules string by pipe operator.
*/
Defined in .../codeigniter4/framework/system/Validation/Validation.php:675
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:92
⧉public setTable(string $table): $this Specify the table associated with a model
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:111
⧉public getIdValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:441
⧉public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $this...
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This methods works only with dbCalls
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:462
⧉public countAllResults(bool $reset = true, bool $test = false): mixed Override countAllResults to account for soft deleted accounts.
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:496
⧉public builder(string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
/**
* Provides a shared instance of the Query Builder.
*
* @throws ModelException
*
* @return BaseBuilder
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:519
⧉public set($key, $value = '', bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. This ...
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:566
⧉public insert($data = null, bool $returnID = true): BaseResult|false|int|object|string Inserts data into the database. If an object is provided, it will attempt to con...
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $data
* @param bool $returnID Whether insert ID should be returned or not.
*
* @throws ReflectionException
*
* @return BaseResult|false|int|object|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:606
⧉public update($id = null, $data = null): bool Updates a single record in the database. If an object is provided, it will attem...
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:632
⧉public __get(string $name): mixed Provides/instantiates the builder/db connection and model's table/primary key na...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:682
⧉public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db connec...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:700
⧉public __call(string $name, array $params): mixed Provides direct access to method in the builder (if available) and the database ...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:715
⧉public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database
/**
* Fetches the row of database
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:504
⧉public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database
/**
* Fetches the column of database
*
* @param string $columnName Column Name
*
* @throws DataException
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:548
⧉public findAll(int $limit0, int $offset0): array Fetches all results, while optionally limiting them.
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:567
⧉public first(): array|object|null Returns the first row of the result set.
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:607
⧉public save($data): bool A convenience method that will attempt to determine whether the data should be i...
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $data Data
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:649
⧉public getInsertID(): int|string Returns last insert ID or 0.
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:684
⧉public insertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @throws ReflectionException
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:774
⧉public updateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update and runs the query
/**
* Compiles an update and runs the query
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
* @throws ReflectionException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:890
⧉public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches
/**
* Deletes a single record from the database where $id matches
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return BaseResult|bool
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:944
⧉public purgeDeleted(): mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:981
⧉public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft deletes ...
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:998
⧉public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1011
⧉public replace(array $data = null, bool $returnSQL = false): mixed Compiles a replace and runs the query
/**
* Compiles a replace and runs the query
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1027
⧉public errors(bool $forceDB = false): array<string,string> Grabs the last error(s) that occurred. If data was validated, it will first chec...
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string,string>
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1052
⧉public paginate(int $perPage = null, string $group = 'default', int $page = null, int $segment0): array|null Works with Pager to get the size and offset parameters. Expects a GET variable (...
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1074
⧉public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed fie...
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1098
⧉public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts again...
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1113
⧉public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1236
⧉public setValidationMessages(array $validationMessages): $this Allows to set validation messages. It could be used when you have to change defa...
/**
* Allows to set validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1251
⧉public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have to c...
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1267
⧉public setValidationRules(array $validationRules): $this Allows to set validation rules. It could be used when you have to change default...
/**
* Allows to set validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1282
⧉public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to cha...
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1298
⧉public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1313
⧉public validate($data): bool Validate the data against the validation rules (or the validation group) specifi...
/**
* Validate the data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1326
⧉public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhere,...
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1356
⧉public getValidationMessages(): array Returns the model's define validation messages so they can be used elsewhere, if...
/**
* Returns the model's define validation messages so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1379
⧉public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the setting. ...
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1415
⧉public asArray(): $this Sets the return type of the results to be as an associative array.
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1467
⧉public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a simple...
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1484
⧉protected generateSlug(array $data)
Defined in .../app/Models/BlogModel.php:31
⧉protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row of database from $this->table with a primary key matching $id. T...
/**
* Fetches the row of database from $this->table with a primary key
* matching $id. This methods works only with dbCalls
* This methods works only with dbCalls
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:128
⧉protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table This methods works only with db...
/**
* Fetches the column of database from $this->table
* This methods works only with dbCalls
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:159
⧉protected doFindAll(int $limit0, int $offset0): array Works with the current Query Builder instance to return all results, while optio...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This methods works only with dbCalls
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:174
⧉protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder ca...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This methods works only with dbCalls
*
* @return array|object|null
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:194
⧉protected doInsert(array $data): bool|Query Inserts data into the current table. This methods works only with dbCalls
/**
* Inserts data into the current table.
* This methods works only with dbCalls
*
* @param array $data Data
*
* @return bool|Query
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:221
⧉protected doInsertBatch(array $set = null, bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior. T...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:260
⧉protected doUpdate($id = null, $data = null): bool Updates a single record in $this->table. This methods works only with dbCalls
/**
* Updates a single record in $this->table.
* This methods works only with dbCalls
*
* @param array|int|string|null $id
* @param array|null $data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:282
⧉protected doUpdateBatch(array $set = null, string $index = null, int $batchSize = 100, bool $returnSQL = false): mixed Number of rows affected or FALSE on failure Compiles an update string and runs the query This methods works only with dbCall...
/**
* Compiles an update string and runs the query
* This methods works only with dbCalls
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @throws DatabaseException
*
* @return mixed Number of rows affected or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:314
⧉protected doDelete($id = null, bool $purge = false): bool|string Deletes a single record from $this->table where $id matches the table's primaryK...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This methods works only with dbCalls
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @throws DatabaseException
*
* @return bool|string
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:331
⧉protected doPurgeDeleted(): bool|mixed Permanently deletes all rows that have been marked as deleted through soft delet...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This methods works only with dbCalls
*
* @return bool|mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:369
⧉protected doOnlyDeleted() Works with the find* methods to return only the rows that have been deleted. Thi...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This methods works only with dbCalls
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:381
⧉protected doReplace(array $data = null, bool $returnSQL = false): mixed Compiles a replace into string and runs the query This methods works only with d...
/**
* Compiles a replace into string and runs the query
* This methods works only with dbCalls
*
* @param array|null $data Data
* @param bool $returnSQL Set to true to return Query String
*
* @return mixed
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:395
⧉protected doErrors(): array<string,string> Grabs the last error(s) that occurred from the Database connection. The return a...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This methods works only with dbCalls
*
* @return array<string,string>
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:408
⧉protected idValue($data): array|int|string|null Returns the id value for the data array or object
/**
* Returns the id value for the data array or object
*
* @param array|object $data Data
*
* @return array|int|string|null
*
* @deprecated Use getIdValue() instead. Will be removed in version 5.0.
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:429
⧉protected shouldUpdate($data): bool This method is called on save to determine if entry have to be updated If this m...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $data Data
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:585
⧉protected objectToRawArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array with raw values.
*
* @param object|string $data
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array|null Array
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:660
⧉protected initialize() Initializes the instance with any additional steps. Optionally implemented by ch...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:308
⧉protected doProtectFields(array $data): array Ensures that only the fields that are allowed to be updated are in the data arra...
/**
* Ensures that only the fields that are allowed to be updated
* are in the data array.
*
* Used by insert() and update() to protect against mass assignment
* vulnerabilities.
*
* @param array $data Data
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1131
⧉protected setDate(int $userData = null): mixed Sets the date or current date if null value is passed
/**
* Sets the date or current date if null value is passed
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @throws ModelException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1159
⧉protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format tha...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @throws ModelException
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1183
⧉protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat
/**
* Converts Time value to string using $this->dateFormat
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1212
⧉protected cleanValidationRules(array $rules, array $data = null): array Removes any rules that apply to fields that have not been set currently so that ...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array|null $data Data
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1392
⧉protected trigger(string $event, array $eventData): mixed A simple event trigger for Model Events that allows additional data manipulation...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @throws DataException
*
* @return mixed
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1444
⧉protected objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
* This method use objectToRawArray internally and does conversion
* to string on all Time instances
*
* @param object|string $data Data
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be casted as array as well
*
* @throws ReflectionException
*
* @return array Array
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1505
⧉protected transformDataToArray($data, string $type): array Transform data to array
/**
* Transform data to array
*
* @param array|object|null $data Data
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1567
⧉protected fillPlaceholders(array $rules, array $data): array Replace any placeholders within the rules with the values that match the 'key' o...
/**
* Replace any placeholders within the rules with the values that
* match the 'key' of any properties being set. For example, if
* we had the following $data array:
*
* [ 'id' => 13 ]
*
* and the following rule:
*
* 'required|is_unique[users,email,id,{id}]'
*
* The value of {id} would be replaced with the actual id in the form data:
*
* 'required|is_unique[users,email,id,13]'
*
* @param array $rules Validation rules
* @param array $data Data
*
* @codeCoverageIgnore
*
* @deprecated use fillPlaceholders($rules, $data) from Validation instead
*/
Inherited from CodeIgniter\BaseModel
Defined in .../codeigniter4/framework/system/BaseModel.php:1668
⇄⧉public static getStatuses()
\App\Models\BlogModel::getStatuses()
Defined in .../app/Models/BlogModel.php:81
⇄⧉public static classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array Takes a class an returns an array of it's public and protected properties as an ...
/**
* Takes a class an returns an array of it's public and protected
* properties as an array suitable for use in creates and updates.
*
* @param object|string $data
* @param string|null $primaryKey
*
* @throws ReflectionException
*
* @codeCoverageIgnore
*
* @deprecated since 4.1
*/
Inherited from CodeIgniter\Model
Defined in .../codeigniter4/framework/system/Model.php:748
uri => string (31) "CodeIgniter\Entity\Cast\URICast"
private _cast -> boolean true
⇄⧉public __construct()
new \App\Entities\Blog()
Defined in .../app/Entities/Blog.php:9
⇄⧉public fill(array $data = null): $this Takes an array of key/value pairs and sets them as class properties, using any `...
$value[9]->fill(array $data = null)
/**
* Takes an array of key/value pairs and sets them as class
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:132
⇄⧉public toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array General method that will return all public and protected values of this entity a...
/**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be casted.
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:154
⇄⧉public toRawArray(bool $onlyChanged = false, bool $recursive = false): array Returns the raw values of the current attributes.
/**
* Returns the raw values of the current attributes.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $recursive If true, inner entities will be casted as array as well.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:198
⇄⧉public syncOriginal(): $this Ensures our "original" values match the current values.
$value[9]->syncOriginal()
/**
* Ensures our "original" values match the current values.
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:242
⇄⧉public hasChanged(string $key = null): bool Checks a property to see if it has changed since the entity was created. Or, wit...
$value[9]->hasChanged(string $key = null)
/**
* Checks a property to see if it has changed since the entity
* was created. Or, without a parameter, checks if any
* properties have changed.
*
* @param string $key
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:256
⇄⧉public setAttributes(array $data): $this Set raw data array without any mutations
$value[9]->setAttributes(array $data)
/**
* Set raw data array without any mutations
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:281
⇄⧉public jsonSerialize(): array Support for json_encode()
$value[9]->jsonSerialize()
/**
* Support for json_encode()
*
* @return array
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:399
⇄⧉public cast(bool $cast = null): bool|Entity Change the value of the private $_cast property
$value[9]->cast(bool $cast = null)
/**
* Change the value of the private $_cast property
*
* @return bool|Entity
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:409
⧉public __set(string $key, $value = null): $this Magic method to all protected/private class properties to be easily set, either ...
/**
* Magic method to all protected/private class properties to be
* easily set, either through a direct access or a
* `setCamelCasedProperty()` method.
*
* Examples:
* $this->my_property = $p;
* $this->setMyProperty() = $p;
*
* @param mixed|null $value
*
* @throws Exception
*
* @return $this
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:435
⧉public __get(string $key): mixed Magic method to allow retrieval of protected and private class properties either...
/**
* Magic method to allow retrieval of protected and private class properties
* either by their name, or through a `getCamelCasedProperty()` method.
*
* Examples:
* $p = $this->my_property
* $p = $this->getMyProperty()
*
* @throws Exception
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:478
⧉public __isset(string $key): bool Returns true if a property exists names $key, or a getter method exists named li...
/**
* Returns true if a property exists names $key, or a getter method
* exists named like for __get().
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:515
⧉public __unset(string $key): void Unsets an attribute property.
/**
* Unsets an attribute property.
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:531
⧉protected mapProperty(string $key): mixed|string Checks the datamap to see if this column name is being mapped, and returns the m...
/**
* Checks the datamap to see if this column name is being mapped,
* and returns the mapped name, if any, or the original name.
*
* @return mixed|string
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:296
⧉protected mutateDate($value): mixed|Time Converts the given string|timestamp|DateTime|Time instance into the "CodeIgniter...
/**
* Converts the given string|timestamp|DateTime|Time instance
* into the "CodeIgniter\I18n\Time" object.
*
* @param mixed $value
*
* @throws Exception
*
* @return mixed|Time
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:319
⧉protected castAs($value, string $attribute, string $method = 'get'): mixed Provides the ability to cast an item as a specific data type. Add ? at the begin...
/**
* Provides the ability to cast an item as a specific data type.
* Add ? at the beginning of $type (i.e. ?string) to get NULL
* instead of casting $value if $value === null
*
* @param mixed $value Attribute value
* @param string $attribute Attribute name
* @param string $method Allowed to "get" and "set"
*
* @throws CastException
*
* @return mixed
*/
Inherited from CodeIgniter\Entity\Entity
Defined in .../codeigniter4/framework/system/Entity/Entity.php:337