Loosely check if the record can be sorted by a property
@param  string $property
@return boolean
12316
public function canSortBy($property)
    {
        $canSort = false;
        $singleton = $this->dataRecord->getDataSingleton();

        if ($singleton) {
            $properties = explode('.', $property);

            $relationClass = $singleton->getRelationClass($properties[0]);
            if ($relationClass) {
                if (count($properties) <= 2 && singleton($relationClass)->hasDatabaseField($properties[1])) {
                    $canSort = true;
                }
            } elseif ($singleton instanceof DataObject) {
                if ($singleton->hasDatabaseField($property)) {
                    $canSort = true;
                }
            }
        }

        return $canSort;
    }
1027648
public function __isset($property)
    {
        // getField() isn't a field-specific getter and shouldn't be treated as such
        if (strtolower($property) !== 'field' && $this->hasMethod($method = "get$property")) {
            return true;
        }
        if ($this->hasField($property)) {
            return true;
        }
        if ($this->failover) {
            return isset($this->failover->$property);
        }

        return false;
    }
819992
private function supportsClause($clause, $property)
    {
        $excludedClause = 'excluded_'.$clause;

        return
            (0 === count($this->specs[$clause]) || in_array($property, $this->specs[$clause])) &&
            (0 === count($this->specs[$excludedClause]) || !in_array($property, $this->specs[$excludedClause]));
    }
983263
protected function isPropertyEnabled(string $property, string $resourceClass): bool
    {
        if (null === $this->properties) {
            // to ensure sanity, nested properties must still be explicitly enabled
            return !$this->isPropertyNested($property, $resourceClass);
        }

        return \array_key_exists($property, $this->properties);
    }
593325
private function getSearchableProperty($property)
    {
        $property = Meta\Reflection::normalizeProperty($property);

        foreach ($this->meta->getIndexedProperties() as $p)
        {
            if (Meta\Reflection::normalizeProperty($p->getName()) == $property)
            {
                return $property;
            }
        }

        //Node properties only have indexing problems
        if($this->meta instanceof Node)
        {
            throw new Exception("Property $property is not indexed or does not exist in {$this->meta->getName()}.");
        }

        //Relations have start/end or indexing problems
        else
        {
            throw new Exception("Property noName is either not indexed, not a start/end, or does not exist in {$this->meta->getName()}.");
        }
    }
710347
private static function isSortable($item, $field) {
        if (is_array($item))
            return array_key_exists($field, $item);
        elseif (is_object($item))
            return isset($item->$field) || property_exists($item, $field);
        else
            return false;
    }
1130671
public function __isset($property)
    {
        if ($property = $this->getEntityDescription()->getProperty($property)) {
            $name = $property->getName();

            if ($this->_data->offsetExists($name)) {
                //if a property is one to one or many to one make sure the value
                //actually exists in the database
                $value = $this->_data->offsetGet($name);

                if ($value instanceof AnDomainEntityProxy) {
                    if ($property->isRelationship() && $property->isOneToOne()) {
                        if (!$value->getObject()) {
                            $this->getRepository()->getCommandChain()->disable();
                            $this->set($name, null);
                            $this->getRepository()->getCommandChain()->enable();

                            return false;
                        }
                    }
                }

                return true;
            }
        }

        return false;
    }
553095
public static function hasSoftProperty(String $property=null) : Bool
	{
		return (isset($this->softProperties[$property])) ? true : false; 
	}
652389
private function indexOf($property)
    {
        foreach ($this->modifiers as $i => $modifier) {
            if ($modifier['property'] === $property) {
                return $i;
            }
        }

        return -1;
    }
208529
public function &__get($property)
    {
        $get[ $property ] = false;

        if (property_exists($this, $property)) {
            return $this->{$property};
        }

        return $get[ $property ];
    }
779074
public function isDirty($property = null)
    {
        if ($property === null) {
            return count($this->_dirty) > 0;
        } else {
            return isset($this->_dirty[$property]);
        }
    }
870409
public function __isset($property)
    {
        if (null !== $this->findProperty($property)) {
            return true;
        } else {
            return isset($this->$property);
        }
    }
544977
public function count($property = null) {
		if ($property === null) {
			return count($this->_map);
		}
		
		if (is_array($property)) {
			$reduceFunction = function(&$result, &$item) use($property) {
				foreach ($property as $part) {
					if (! isset($item[$part])) {
						return;
					}
				}
				
				return $result + 1;
			};
		} else {
			$reduceFunction = function(&$result, &$item) use($property) {
				if (isset($item[$property])) {
					return $result + 1;
				};
			};
		}
		
		return (int) array_reduce($this->_data, $reduceFunction, 0);
	}
202538
function sort(property) {
  // sort by multiple properties
  function multisort(properties) {
    return function multiCompare(a, b) {
      var i = 0;
      var result = 0;
      var numberOfProperties = properties.length;
      while(result === 0 && i < numberOfProperties) {
        result = sort(properties[i])(a, b);
        i++;
      }
      return result;
    };
  }

  if (_.isArray(property)) return multisort(property);
  debug('sorting by %s', property || '');
  var sortOrder = 1;
  // property may be preparsed object
  if (_.isObject(property)) {
    var propertyKey = _.keys(property)[0];
    sortOrder = property[propertyKey];
    property = propertyKey;
  }
  else if (property[0] === '-') {
    sortOrder = -1;
    property = property.substr(1);
  }
  function compare(a, b) {
    var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;
    return result * sortOrder;
  }
  return compare;
}
1030984
public static function hasProperty($subject, $property) {
    $rval = false;
    if(property_exists($subject, $property)) {
      $value = $subject->{$property};
      $rval = (!is_array($value) || count($value) > 0);
    }
    return $rval;
  }
450164
public function isValid($property = null) {
		$validators = $this->getValidators();
		
		if ($validators === null) {
			return true;
		}
		
		if ($property === null) {
			$data = &$this->_data;
		} else if (is_array($property)) {
			$data = array_intersect_key($this->_data, array_flip($property));

			if (empty($data)) {
				throw new Exception('Specified properties are absent');
			}
		} else {
			if (! isset($this->_data[$property])) {
				throw new Exception('Specified property is absent');
			}
			
			$data = [$property => $this->_data[$property]];
		}
		
		$valid    = true;
		$messages = [];
		
		foreach ($data as $name => $value) {
			if (! isset($validators[$name])) {
				continue;
			}
			
			foreach ($validators[$name] as $validator) {
				if ($validator->isValid($value)) {
					continue;
				}
				
				if (isset($messages[$name])) {
					$messages[$name] = array_merge($messages[$name], $validator->getMessages());
				} else {
					$messages[$name] = $validator->getMessages();
				}

				$valid = false;
				
			}
			
		}
		
		$this->_validatorsMessages = $messages;
		
		return $valid;
	}
1282760
public function hasProperty($property)
    {
        if (property_exists($this, $property) || !is_null($this->data($property))) {
            return true;
        }

        return false;
    }