Overview

Namespaces

  • Charcoal
    • Object
    • User
      • Acl

Classes

  • Content
  • ObjectRevision
  • ObjectRoute
  • ObjectSchedule
  • UserData

Interfaces

  • ArchivableInterface
  • CategorizableInterface
  • CategorizableMultipleInterface
  • CategoryInterface
  • ContentInterface
  • HierarchicalInterface
  • ObjectRevisionInterface
  • ObjectRouteInterface
  • ObjectScheduleInterface
  • PublishableInterface
  • RevisionableInterface
  • RoutableInterface
  • UserDataInterface

Traits

  • ArchivableTrait
  • CategorizableMultipleTrait
  • CategorizableTrait
  • CategoryTrait
  • HierarchicalTrait
  • PublishableTrait
  • RevisionableTrait
  • RoutableTrait
  • Overview
  • Namespace
  • Class

Class UserData

User Data is a base model for objects typically submitted by the end-user of the application.

Charcoal\Model\AbstractModel
Extended by Charcoal\Object\UserData implements Charcoal\Object\UserDataInterface
Namespace: Charcoal\Object
Located at Charcoal/Object/UserData.php
Methods summary
public Charcoal\Object\UserDataInterface
# setIp( integer|null $ip )

Set the client IP address.

Set the client IP address.

Parameters

$ip
The remote IP at object creation.

Returns

Charcoal\Object\UserDataInterface
Chainable

Implementation of

Charcoal\Object\UserDataInterface::setIp()
public integer|null
# ip( )

Retrieve the client IP address.

Retrieve the client IP address.

Returns

integer|null

Implementation of

Charcoal\Object\UserDataInterface::ip()
public Charcoal\Object\UserDataInterface
# setLang( string $lang )

Set the origin language.

Set the origin language.

Parameters

$lang
The language code.

Returns

Charcoal\Object\UserDataInterface
Chainable

Throws

InvalidArgumentException
If the argument is not a string.

Implementation of

Charcoal\Object\UserDataInterface::setLang()
public string
# lang( )

Retrieve the language.

Retrieve the language.

Returns

string

Implementation of

Charcoal\Object\UserDataInterface::lang()
public Charcoal\Object\UserDataInterface
# setOrigin( string $origin )

Set the origin of the object submission.

Set the origin of the object submission.

Parameters

$origin
The source URL or identifier of the submission.

Returns

Charcoal\Object\UserDataInterface
Chainable

Throws

InvalidArgumentException
If the argument is not a string.

Implementation of

Charcoal\Object\UserDataInterface::setOrigin()
public string
# resolveOrigin( )

Resolve the origin of the user data.

Resolve the origin of the user data.

Returns

string
public string
# origin( )

Retrieve the origin of the object submission.

Retrieve the origin of the object submission.

Returns

string

Implementation of

Charcoal\Object\UserDataInterface::origin()
public Charcoal\Object\UserDataInterface
# setTs( DateTime|string|null $timestamp )

Set when the object was created.

Set when the object was created.

Parameters

$timestamp

The timestamp at object's creation. NULL is accepted and instances of DateTimeInterface are recommended; any other value will be converted (if possible) into one.

Returns

Charcoal\Object\UserDataInterface
Chainable

Throws

InvalidArgumentException
If the timestamp is invalid.

Implementation of

Charcoal\Object\UserDataInterface::setTs()
public DateTime|null
# ts( )

Retrieve the creation timestamp.

Retrieve the creation timestamp.

Returns

DateTime|null

Implementation of

Charcoal\Object\UserDataInterface::ts()
public boolean
# preSave( )

Event called before creating the object.

Event called before creating the object.

Returns

boolean

See

Charcoal\Source\StorableTrait::preSave() For the "create" Event.
API documentation generated by ApiGen