コード例 #1
0
 public function toObject($dbObject = null, $skip = array())
 {
     if (!$dbObject) {
         $dbObject = new kUserEmailContextField();
     }
     return parent::toObject($dbObject, $skip);
 }
コード例 #2
0
 public function toObject($dbObject = null, $skip = array())
 {
     if (!$dbObject) {
         $dbObject = new kCoordinatesContextField();
     }
     return parent::toObject($dbObject, $skip);
 }
コード例 #3
0
 public function toObject($dbObject = null, $skip = array())
 {
     if (!$dbObject) {
         $dbObject = new kObjectIdField();
     }
     return parent::toObject($dbObject, $skip);
 }
コード例 #4
0
 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     /* @var $dbObject kFieldMatchCondition */
     parent::doFromObject($dbObject, $responseProfile);
     $fieldType = get_class($dbObject->getField());
     KalturaLog::debug("Loading KalturaStringField from type [{$fieldType}]");
     switch ($fieldType) {
         case 'kCountryContextField':
             $this->field = new KalturaCountryContextField();
             break;
         case 'kIpAddressContextField':
             $this->field = new KalturaIpAddressContextField();
             break;
         case 'kUserAgentContextField':
             $this->field = new KalturaUserAgentContextField();
             break;
         case 'kUserEmailContextField':
             $this->field = new KalturaUserEmailContextField();
             break;
         case 'kCoordinatesContextField':
             $this->field = new KalturaCoordinatesContextField();
             break;
         case 'kEvalStringField':
             $this->field = new KalturaEvalStringField();
             break;
         case 'kObjectIdField':
             $this->field = new KalturaObjectIdField();
             break;
         case 'kEvalStringField':
             $this->field = new KalturaEvalStringField();
             break;
         case 'kObjectIdField':
             $this->field = new KalturaObjectIdField();
             break;
         default:
             $this->field = KalturaPluginManager::loadObject('KalturaStringField', $fieldType);
             break;
     }
     if ($this->field) {
         $this->field->fromObject($dbObject->getField());
     }
 }
 public function fromObject($dbObject)
 {
     /* @var $dbObject kFieldMatchCondition */
     parent::fromObject($dbObject);
     $fieldType = get_class($dbObject->getField());
     KalturaLog::debug("Loading KalturaStringField from type [{$fieldType}]");
     switch ($fieldType) {
         case 'kCountryContextField':
             $this->field = new KalturaCountryContextField();
             break;
         case 'kIpAddressContextField':
             $this->field = new KalturaIpAddressContextField();
             break;
         case 'kUserAgentContextField':
             $this->field = new KalturaUserAgentContextField();
             break;
         default:
             $this->field = KalturaPluginManager::loadObject('KalturaStringField', $fieldType);
             break;
     }
     if ($this->field) {
         $this->field->fromObject($dbObject->getField());
     }
 }