========== PROPERTY (TO) ==========
13034
protected function toArrayProperty($p, $pn, $policy, Reader $ar, PolicyResolver $pr, \ReflectionClass $headRefClass) {
        $getter = $policy->getter ?: 'get'.ucfirst($pn);
        $result = null;
        
        // ========== SCALAR TYPES ==========
        if($column = $ar->getPropertyAnnotation($p, 'Doctrine\ORM\Mapping\Column')) { // scalar
            $result = $this->$getter();
            if(($policy instanceof Policy\Interfaces\CustomTo) && $policy->format) {
                return call_user_func_array($policy->format, [$result, $column->type]);
            }
            switch($column->type) {
                case 'simple_array':
                    // @see https://github.com/doctrine/doctrine2/issues/4673
                    if($pr->hasOption(PolicyResolver::SIMPLE_ARRAY_FIX)
                       && is_array($result)
                       && (count($result) === 1)
                       && ($result[0] === null)) {
                        return [];
                    } break;
                case 'date':
                case 'time':
                case 'datetime':
                case 'detetimez':
                    if($result !== null) {
                        if($policy instanceof Policy\Interfaces\FormatDateTimeTo) {
                            $result = $result->format($policy->format);
                            if($result === false) { throw new Exceptions\PolicyException('Wrong DateTime format for field "'.$pn.'"'); }
                        } else if(!$policy instanceof Policy\Interfaces\KeepDateTimeTo) {
                            $result = $result->format('Y-m-d\TH:i:s').'.000Z';
                        }
                    }
                    break;
            }
        
        // ========== RELATIONS ==========
        } else if($association = static::getPropertyAssociation($p, $ar)) { // entity or collection
            $isCollection = false;
            
            if($association instanceof OneToMany) {
                $result = ['__meta' => ['class' => static::getEntityFullName($headRefClass, $association->targetEntity),
                                       'association' => 'OneToMany'], 'collection' => []];
                $isCollection = true;
            } else if($association instanceof ManyToMany) {
                $result = ['__meta' => ['class' => static::getEntityFullName($headRefClass, $association->targetEntity),
                                       'association' => 'ManyToMany'], 'collection' => []];
                $isCollection = true;
            }
            
            $v = $this->$getter();
            
            // ========== COLLECTION RELATION ==========
            if($isCollection) {
                $collection = $v;
                if($collection->count()) {
                    if($policy instanceof Policy\Interfaces\FetchPaginateTo) { // pagination policy
                        if($policy->fromTail) {
                            $offset = $collection->count() - $policy->limit - $policy->offset;
                            if($offset < 0) { $offset = 0; }
                            $limit = ($collection->count() > $policy->limit) ? $collection->count() : $policy->limit;
                            $collection = $collection->slice($offset, $limit);
                        } else {
                            $collection = $collection->slice($policy->offset, $policy->limit);
                        }
                    }
                    foreach($collection as $el) {
                        $result['collection'][] = $el->toArray($policy, $ar, $pr);
                    }
                }
                
            // ========== SUB-ENTITY RELATION ==========
            } else { // single entity
                if($v) { $result = $v->toArray($policy, $ar, $pr); }
            }
            
            if(($policy instanceof Policy\Interfaces\CustomTo) && $policy->transform) {
                $result = call_user_func_array($policy->transform, [$v, $result]);
            }
            
        // ========== NON-DOCTRINE TYPE ==========
        } else {
            $result = $this->$getter();
            if(($policy instanceof Policy\Interfaces\CustomTo) && $policy->format) {
                return call_user_func_array($policy->format, [$result, null]);
            }
        }
        return $result;
    }
1024062
function(prop) {
      var args = Array.prototype.slice.apply(arguments, [1]);
      if (this.setter[prop]) {
        this.setter[prop].apply(this, args);
      } else {
        this[prop] = args.join(',');
      }
    }
998536
function extend( to, from ){
        var desc, key;
        for ( key in from ){
            desc = Object.getOwnPropertyDescriptor( from, key );
            if ( desc.get || desc.set ){

                Object.defineProperty( to, key, desc );

            } else if ( Physics.util.isFunction( desc.value ) ){

                to[ key ] = desc.value;
            }
        }
        return to;
    }
285229
function property (model, key) {
  return function (val) {
    return (
      get(val) ? model.get(key) :
      set(val) ? model.set(key, val) :
      (model.on('change:'+key, val), function () {
        model.removeListener('change:'+key, val)
      })
    )}}
424232
function defineProperty (key, handler, value) {
    Object.defineProperty(ctrl, key, {
      get: function () { return value; },
      set: function (newValue) {
        var oldValue = value;
        value        = newValue;
        handler && handler(newValue, oldValue);
      }
    });
  }
376906
function ( property, value ) {
            var el = this.element();
            //setter
            if ( value || value == 0 ) {
                el.setProperty( property, String(value), null );
                //getter
            } else {
                return el.getPropertyValue( property );
            }
        }
800925
function makeMeAnObject(thing, property) {
        if (property === null || property === undefined) property = 'payload'
        if ( typeof property !== 'string' ) {
            console.warn('makeMeAnObject:WARNING: property parameter must be a string and not: ' + typeof property)
            property = 'payload'
        }
        var out = {}
        if (typeof thing === 'object') { out = thing }
        else if (thing !== null) { out[property] = thing }
        return out
    }
268931
public function setTo($to)
    {
        if ($to === null) {
            throw new BuildException("this mapper requires a 'to' attribute");
        }

        $index = strrpos($to, '*');
        if ($index === false) {
            $this->toPrefix = $to;
            $this->toPostfix = "";
        } else {
            $this->toPrefix = substr($to, 0, $index);
            $this->toPostfix = substr($to, $index + 1);
            $this->toContainsStar = true;
        }
    }
1327629
public static void setProperty2(Object newValue, Object object, String property) {
        setProperty(object, property, newValue);
    }
482699
public void copyTo(Object to) {
        modify(() -> field.set(to, field.get(object)), false);
    }
1208666
function processProperty(item, property, value) {
    if (value !== null && typeof value === "object") {
        processObjectProperty(item, property, value);
        return;
    }
    if (!item.hasOwnProperty(property)) {
        item[property] = null;
    }

    //Boolean type
    if (value === false && item[property] == null) {
        delete item.$changedProps[property];
        return;
    }

    //Float type
    if (Number.isFinite(item[property])) {
        item[property] = item[property] + "";
    }

    //Other types
    // console.log("OTHER TYPES, value:", value);
    if (item[property] !== value) {
        item.$changedProps[property] = value;
    } else {
        delete item.$changedProps[property];
    }
}
840742
function (path, value) {
    if (typeof path == 'string') {
      path = path.split('.');
    } else if (!Array.isArray(path)) {
      return;
    }

    var propName = path.shift();
    var prop = Model.allProperties[propName] || opts.extra[propName];
    var currKey, currObj;

    if (!prop) {
      return;
    }
    if (path.length == 0) {
      instance[propName] = value;
      return;
    }
    currObj = instance[propName];

    while(currObj && path.length > 0 ) {
      currKey = path.shift();

      if (path.length > 0) {
        currObj = currObj[currKey];
      } else if (currObj[currKey] !== value) {
        currObj[currKey] = value;
        opts.changes.push(propName);
      }
    }
  }
59042
function( value, properties ) {
			var errors = [];

			// Convert the properties to an array:
			properties = properties.split( ',' );

			// Check for each property:
			for ( var i = 0; i < properties.length; i++ ) {
				if ( !value.hasOwnProperty( properties[ i ] ) ) {
					errors.push({
						"rule": "hasProperties",
						"message": "ERROR:value does not have the following property: " + properties[ i ]
					});
				}
			} // end FOR i

			return errors;
		}
832796
@NonNull
    public EmailIntentBuilder to(@NonNull Collection<String> to) {
        checkNotNull(to);
        for (String email : to) {
            checkEmail(email);
        }
        this.to.addAll(to);

        return this;
    }
291739
function(propertyA, propertyB, opts) {
  opts = opts || {}
  const typeA = identify(propertyA);
  const typeB = identify(propertyB);

  // Simple value comparison
  if (typeA === types.string || typeA === types.number || typeA === types.boolean || typeA === types.function) {
    return propertyA === propertyB;
  }
  else if (typeA === types.array) {
    return propertyA.sort().toString() === propertyB.sort().toString();
  }
  else if (typeA === types.date) {
    return propertyA.valueOf() === propertyB.valueOf();
  }
  else if (typeA === types.object) {
    return compareObjectWithKeys(propertyA, propertyB)
  }
  else if (typeA === types.class) {
    if (opts.classComparator) {
      opts.classComparator(propertyA, propertyB);
    } else if (propertyA.constructor.name !== propertyB.constructor.name) {
      return false;
    }
    return compareObjectWithKeys(propertyA, propertyB)
  }
  return typeA === typeB;
}
232161
function formatProperty(property, syntax) {
		var ix = property.indexOf(':');
		property = property.substring(0, ix).replace(/\s+$/, '') 
			+ getSyntaxPreference('valueSeparator', syntax)
			+ utils.trim(property.substring(ix + 1));
		
		return property.replace(/\s*;\s*$/, getSyntaxPreference('propertyEnd', syntax));
	}
98231
function toEntries(object, properties) {
  return flatten(properties.map(name => {
    const p = descriptorOf(object, name);

    let result = [];

    if (p.get) {
      result.push({ name, value: p.get, kind: 'getter' });
    }
    if (p.set) {
      result.push({ name, value: p.set, kind: 'setter' });
    }
    if (p.value) {
      result.push({ name, value: p.value, kind: 'value' });
    }

    return result;
  }));
}