Class Socialveo\Core\models\Connection

InheritanceSocialveo\Core\models\Connection » Socialveo\Core\models\SocialveoModel » Phalcon\Mvc\Model
Uses TraitsSocialveo\Core\Translatable

Class Connection

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__get() Magic method to get related records using the relation alias as a property or getters defined by setGetter() Socialveo\Core\models\SocialveoModel
__isset() Magic method to check if a property is a valid relation Socialveo\Core\models\SocialveoModel
__set() Magic method to set related records using the relation alias as a property or setters defined by setSetter() Socialveo\Core\models\SocialveoModel
_t() Gets translations Socialveo\Core\Translatable
afterCreate() After create hook Socialveo\Core\models\Connection
afterDelete() After delete hook Socialveo\Core\models\Connection
afterSave() After save hook Socialveo\Core\models\Connection
afterUpdate() After delete hook Socialveo\Core\models\Connection
beforeCreate() Socialveo\Core\models\Connection
behaviors() Get behaviors Socialveo\Core\models\SocialveoModel
behaviorsNotify() Behavior notify Socialveo\Core\models\SocialveoModel
cachedFind() Returns query results from cache (if set and not expired) or database Socialveo\Core\models\SocialveoModel
change() Changes object attributes based on passed-in payload data, saves object and returns it Socialveo\Core\models\SocialveoModel
createObject() Creates an object using passed-in payload data Socialveo\Core\models\SocialveoModel
deleteObject() Deletes an object (soft-delete) Socialveo\Core\models\SocialveoModel
deleteTargetIndex() Delete target index Socialveo\Core\models\SocialveoModel
fetchObjects() Fetches the provided objects and returns them in an array Socialveo\Core\models\SocialveoModel
filteredFind() Returns query results filtered by GET user-parameters, optionaly cached Socialveo\Core\models\SocialveoModel
findFirstByUuid() Find first model by uuid Socialveo\Core\models\SocialveoModel
fire() Fire event Socialveo\Core\models\SocialveoModel
forUpdate() Socialveo\Core\models\SocialveoModel
getActiveDeleted() Returns whether model is deleted Socialveo\Core\models\SocialveoModel
getActiveOk() Socialveo\Core\models\SocialveoModel
getActivePaymentProcess() Socialveo\Core\models\SocialveoModel
getAttributes() Get model meta data attributes Socialveo\Core\models\SocialveoModel
getAttributesStatic() Get models metadata attributes Socialveo\Core\models\SocialveoModel
getChangedFields() Returns a list of changed values Socialveo\Core\models\SocialveoModel
getCircleName() Return name of connection Socialveo\Core\models\Connection
getCircles() Returns connection circles Socialveo\Core\models\Connection
getConnections() Returns a list of connections to a Network (group, conversation or profile). Socialveo\Core\models\Connection
getEventsManagerInstance() Returns models Events Manager Socialveo\Core\models\SocialveoModel
getGetters() Return getters Socialveo\Core\models\SocialveoModel
getIsBlocked() Socialveo\Core\models\Connection
getIsConfirmed() Socialveo\Core\models\Connection
getIsConnected() Socialveo\Core\models\Connection
getIsFollow() Socialveo\Core\models\Connection
getIsForgot() Socialveo\Core\models\Connection
getIsInvited() Socialveo\Core\models\Connection
getIsOwner() Check if user is owner of resource Socialveo\Core\models\SocialveoModel
getIsPending() Socialveo\Core\models\Connection
getLastQueryFullCount() Socialveo\Core\models\SocialveoModel
getModel() Get model Socialveo\Core\models\SocialveoModel
getObjectByParam() Fetches an object based on passed array Socialveo\Core\models\SocialveoModel
getObjectTypeByParam() Returns an resource type based on request URI Socialveo\Core\models\SocialveoModel
getPaymentIsOk() Returns true if is payment ok Socialveo\Core\models\SocialveoModel
getRealOwner() Return real owner Socialveo\Core\models\SocialveoModel
getResourceType() Returns a string resource name of the Object (singular form) Socialveo\Core\models\SocialveoModel
getScenario() Socialveo\Core\models\SocialveoModel
getSetters() Return setters Socialveo\Core\models\SocialveoModel
getSource() Define table mapping Socialveo\Core\models\Connection
getSourceTable() Returns the source table Socialveo\Core\models\SocialveoModel
getStatusString() Returns status of connection Socialveo\Core\models\Connection
getTarget() Returns target object Socialveo\Core\models\SocialveoModel
getTargetObject() Returns the target object by target_id and target_type Socialveo\Core\models\SocialveoModel
getTargetObjectFromArray() Fetches an object based on passed array Socialveo\Core\models\SocialveoModel
getTargetType() Returns target type Socialveo\Core\models\SocialveoModel
getUuidsObjects() Fetch objects passed in array Socialveo\Core\models\SocialveoModel
hasChanged() Check if a specific attribute has changed This only works if the model is keeping data snapshots Socialveo\Core\models\SocialveoModel
hasFollow() Socialveo\Core\models\Connection
initBehaviors() Init behaviors Socialveo\Core\models\SocialveoModel
initialize() Initialize method for model Socialveo\Core\models\Connection
isModel() Check if called class and the model name is the same Socialveo\Core\models\SocialveoModel
isNew() Checks whether model is new Socialveo\Core\models\SocialveoModel
isNewRecord() Checks whether model is new Socialveo\Core\models\SocialveoModel
isSkipValidation() Is skip validation Socialveo\Core\models\SocialveoModel
onConstruct() OnConstruct event model Socialveo\Core\models\SocialveoModel
pluralize() Transforms words from singular to plural Socialveo\Core\models\SocialveoModel
readAttribute() Read attribute from getter Socialveo\Core\models\SocialveoModel
resourceToModel() Transforms a resource name string to a Model name (if such model exists) Socialveo\Core\models\SocialveoModel
resultsetToJson() Returns an array of typed arrays, ready to be json_encoded Socialveo\Core\models\SocialveoModel
retrieve() Returns object from cache (if set and not expired) or database Socialveo\Core\models\SocialveoModel
setGetter() Set getter Socialveo\Core\models\SocialveoModel
setScenario() Socialveo\Core\models\SocialveoModel
setSetter() Set setter Socialveo\Core\models\SocialveoModel
setTargetObject() Set target_id and target_type Socialveo\Core\models\SocialveoModel
singularize() Transforms words from plural to singular Socialveo\Core\models\SocialveoModel
t() Gets translations Socialveo\Core\Translatable
toJson() Convert to json Socialveo\Core\models\Connection
updateFields() Update only custom fields Socialveo\Core\models\SocialveoModel
userHasAccess() Returns true if user has access to resource, otherwise false Socialveo\Core\models\SocialveoModel
validation() Validations Socialveo\Core\models\Connection
writeAttribute() Write attribute using setter Socialveo\Core\models\SocialveoModel

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_postSaveRelatedRecords() Override default method for turn off auto-updating related records Socialveo\Core\models\SocialveoModel
_preSaveRelatedRecords() Override default method for turn off auto-updating related records Socialveo\Core\models\SocialveoModel
afterFetch() After fetch hook Socialveo\Core\models\SocialveoModel
beforeDelete() Before delete hook Socialveo\Core\models\SocialveoModel
beforeSave() Before save hook Socialveo\Core\models\SocialveoModel
beforeUpdate() Before update hook Socialveo\Core\models\SocialveoModel
getUser() Returns user model of the currently logged in (or passed-in) user Socialveo\Core\models\SocialveoModel

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ACTIVE_DELETE 0 Delete Socialveo\Core\models\SocialveoModel
ACTIVE_OK 1 Active Socialveo\Core\models\SocialveoModel
ACTIVE_PROCESS_PAYMENT 2 Payment process Socialveo\Core\models\SocialveoModel
FLAGS_FOLLOWER self::FLAG_PENDING | self::FLAG_FORGOT | self::FLAG_CONFIRMED | self::FLAG_FOLLOW Follower flags of connection Socialveo\Core\models\Connection
FLAG_BLOCKED 2 Connection status blocked (blacklisted) Socialveo\Core\models\Connection
FLAG_CONFIRMED 16 Connection status confirmed Socialveo\Core\models\Connection
FLAG_CONNECTED 8 Connection status connected (one way) Socialveo\Core\models\Connection
FLAG_FOLLOW 64 Connection flag follow Socialveo\Core\models\Connection
FLAG_FORGOT 4 Connection status still pending but to be decided upon later ("not now" / "dismiss") Socialveo\Core\models\Connection
FLAG_INVITED 32 Connection status invited, waiting for user decision Socialveo\Core\models\Connection
FLAG_PENDING 1 Connection status pending Socialveo\Core\models\Connection
NETWORK_TYPE_NETWORK 'network' Socialveo\Core\models\Connection
NETWORK_TYPE_PROFILE 'profile' Socialveo\Core\models\Connection
SCENARIO_DEFAULT 'default' Socialveo\Core\models\SocialveoModel
SCENARIO_DELETE 'delete' Socialveo\Core\models\SocialveoModel
SCENARIO_PAYMENT 'payment' Socialveo\Core\models\SocialveoModel
SCENARIO_SAVE_USER 'save_user' Socialveo\Core\models\SocialveoModel
SCENARIO_SKIP_VALIDATION 'skip_validation' Socialveo\Core\models\SocialveoModel

Property Details

$active public property (available since version 1.0)
public integer $active null
$created public property (available since version 1.0)
public integer $created null
$flags public property (available since version 1.0)
public integer $flags null
$id public property (available since version 1.0)
public integer $id null
$network_id public property (available since version 1.0)
public integer $network_id null
$network_type public property (available since version 1.0)
public string $network_type null
$network_uuid public property (available since version 1.0)
public string $network_uuid null
$payment_id public property (available since version 1.0)
public integer $payment_id null
$payment_uuid public property (available since version 1.0)
public integer $payment_uuid null
$updated public property (available since version 1.0)
public integer $updated null
$user_id public property (available since version 1.0)
public integer $user_id null
$user_uuid public property (available since version 1.0)
public string $user_uuid null
$uuid public property (available since version 1.0)
public string $uuid null

Method Details

afterCreate() public method (available since version 1.0)

After create hook

public void afterCreate ( )
afterDelete() public method (available since version 1.0)

After delete hook

public void afterDelete ( )
afterSave() public method (available since version 1.0)

After save hook

public void afterSave ( )
afterUpdate() public method (available since version 1.0)

After delete hook

public void afterUpdate ( )
throws Exception
beforeCreate() public method

public void beforeCreate ( )
throws Exception
getCircleName() public method

Return name of connection

public string getCircleName ( )
throws Exception
getCircles() public method

Returns connection circles

public Socialveo\Core\models\ConnectionCircle[] getCircles ( )
getConnections() public static method

Returns a list of connections to a Network (group, conversation or profile).

public static array getConnections ( $network_uuid, $params )
$network_uuid string
$params array
throws Exception
getIsBlocked() public method

public boolean getIsBlocked ( )
getIsConfirmed() public method

public boolean getIsConfirmed ( )
getIsConnected() public method

public boolean getIsConnected ( )
getIsFollow() public method

public boolean getIsFollow ( )
getIsForgot() public method

public boolean getIsForgot ( )
getIsInvited() public method

public boolean getIsInvited ( )
getIsPending() public method

public boolean getIsPending ( )
getSource() public method (available since version 1.0)

Define table mapping

public string getSource ( )
getStatusString() public method

Returns status of connection

public string getStatusString ( )
hasFollow() public static method

public static boolean hasFollow ( Socialveo\Core\models\User $user, Socialveo\Core\models\Network $network, $type )
$user Socialveo\Core\models\User
$network Socialveo\Core\models\Network
$type string
initialize() public method (available since version 1.0)

Initialize method for model

public void initialize ( )
toJson() public method (available since version 1.0)

Convert to json

public array toJson ( $embed = [], $extraFields = [] )
$embed array
$extraFields array
validation() public method (available since version 1.0)

Validations

public boolean|void validation ( )