Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
UModel Class Reference

Ubiquity\utils\models$UModel This class is part of Ubiquity. More...

Static Public Member Functions

static toggleProperty (object $object, string $propertyName)
 
static incProperty (object $object, string $propertyName, $val=1)
 
static decProperty (object $object, string $propertyName, $val=1)
 
static concatProperty (object $object, string $propertyName, $val, bool $after=true)
 
static addTo (object $object, string $propertyName, $val)
 
static removeFrom (object $object, string $propertyName, $val)
 
static removeFromByIndex (object $object, string $propertyName, $index)
 
static asArray (object $object)
 
static asJson (object $object, int $options=0)
 
static asArrayProperties (object $object, array $properties)
 
static asJsonProperties (object $object, array $properties, int $options=0)
 
static equals (object $object,?object $toObject, string $property='id')
 Determines if 2 objects are equal.
 

Static Private Member Functions

static getSet (string $propertyName)
 

Detailed Description

Ubiquity\utils\models$UModel This class is part of Ubiquity.

Author
jc
Version
1.0.0

Definition at line 15 of file UModel.php.

Member Function Documentation

◆ addTo()

static addTo ( object  $object,
string  $propertyName,
  $val 
)
static
Parameters
object$object
string$propertyName
mixed$val

Definition at line 70 of file UModel.php.

◆ asArray()

static asArray ( object  $object)
static
Parameters
object$object
Returns
array

Definition at line 117 of file UModel.php.

◆ asArrayProperties()

static asArrayProperties ( object  $object,
array  $properties 
)
static
Parameters
object$object
array$properties
Returns
array

Definition at line 135 of file UModel.php.

◆ asJson()

static asJson ( object  $object,
int  $options = 0 
)
static
Parameters
object$object
int$options
Returns
string

Definition at line 126 of file UModel.php.

◆ asJsonProperties()

static asJsonProperties ( object  $object,
array  $properties,
int  $options = 0 
)
static
Parameters
object$object
array$properties
int$options
Returns
string

Definition at line 150 of file UModel.php.

◆ concatProperty()

static concatProperty ( object  $object,
string  $propertyName,
  $val,
bool  $after = true 
)
static
Parameters
object$object
string$propertyName
mixed$val
bool$after

Definition at line 56 of file UModel.php.

◆ decProperty()

static decProperty ( object  $object,
string  $propertyName,
  $val = 1 
)
static
Parameters
object$object
string$propertyName
number$val

Definition at line 45 of file UModel.php.

◆ equals()

static equals ( object  $object,
?object  $toObject,
string  $property = 'id' 
)
static

Determines if 2 objects are equal.

Parameters
object$object
object$toObject
string$property
Returns
boolean

Definition at line 161 of file UModel.php.

◆ getSet()

static getSet ( string  $propertyName)
staticprivate

Definition at line 16 of file UModel.php.

◆ incProperty()

static incProperty ( object  $object,
string  $propertyName,
  $val = 1 
)
static
Parameters
object$object
string$propertyName
number$val

Definition at line 35 of file UModel.php.

◆ removeFrom()

static removeFrom ( object  $object,
string  $propertyName,
  $val 
)
static
Parameters
object$object
string$propertyName
mixed$val
Returns
mixed

Definition at line 83 of file UModel.php.

◆ removeFromByIndex()

static removeFromByIndex ( object  $object,
string  $propertyName,
  $index 
)
static
Parameters
object$object
string$propertyName
mixed$index
Returns
mixed

Definition at line 101 of file UModel.php.

◆ toggleProperty()

static toggleProperty ( object  $object,
string  $propertyName 
)
static
Parameters
object$object
string$propertyName

Definition at line 25 of file UModel.php.


The documentation for this class was generated from the following file: