Get by property

@param    Property to look for
@return   App\Model\UserModel
181106
public function getByEmail ($email)
    {
        $entity = $this->er->findOneBy(array('email' => $email));

        if (NULL == $entity) {
            throw new Exception("User not found: email=$email");
        }

        return $this->getModel($entity);
    }
206969
public function &__get($property)
	{
		$value = null;
		
		if(!empty($property))
		{
			$call = "getter_".$property;
			
			if(method_exists($this, $call))
				$value = $this->{$call}();
			
			/*
				elseif($this instanceof ArrayAccess)
					$value = $this->offsetGet($property);
			*/
		}
		
		return $value;
	}
1170459
public function getDataProperty($property)
    {
        return isset($this->data[$property]) ? $this->data[$property] : null;
    }
838298
public function getUser($property, $value)
    {
        $class = new \core_kernel_classes_Class(GenerisRdf::CLASS_GENERIS_USER);

        $users = \tao_models_classes_UserService::singleton()->searchInstances(
            array($property => $value), 
            $class,
            array('like' => false, 'recursive' => true)
        );
        $user = empty($users) ? null : current($users);
        
        return $user;
    }
370433
public function getProperty($property, $item)
    {
        if (gettype($item) == 'array') {
            return $item[$property];
        } elseif (gettype($item) == 'object') {
            return $item->$property;
        }
        return null;
    }
906054
public function get($property = null, $default = null)
	{
		if (isset($this->_meta->property)) {
			return $this->_meta->property;
		}

		return $default;
	}
52722
public function get($property = null)
    {
        if ($property === null || $property == '') {
            return $this->config;
        }

        $tree = explode('.', $property);
        $node = $this->config;
        foreach ($tree as $workingNode) {
            if (!array_key_exists($workingNode, $node)) {
                $actualNode = null;
                foreach ($node as $testNodeKey => $testNode) {
                    if (\URLify::filter($testNodeKey) == $workingNode) {
                        $actualNode = $testNodeKey;
                    }
                }
                if ($actualNode === null) {
                    throw new \InvalidArgumentException('The property "'.$property
                        .'" was not found. Failed while getting node "'.$workingNode.'"');
                }
                $workingNode = $actualNode;
            }
            $node = $node[$workingNode];
        }

        return $node;
    }
366316
public function get($property, $type = null, $default = null)
    {
        if (!isset($this->param[$property])) {
            return $default;
        }

        if (isset($type)) {
            $method = TypeCast::METHODPREFIX . $type;

            return TypeCast::$method($this->param[$property]);
        }

        return $this->param[$property];
    }
873915
public function get(string $property, $callback = false)
    {
        if (isset($this->processed[$property])) {
            if ($callback) {
                return \call_user_func($callback, $this->processed[$property]);
            }

            return $this->processed[$property];
        }

        return false;
    }
605298
public function get($property)
    {
        $auth = $this->authenticationService;
        if ($auth->hasIdentity()) {
            if (false !== strpos($property, '.')) {
                $value = $auth->getUser();
                foreach (explode('.', $property) as $prop) {
                    $value = $value->$prop;
                }
                return $value;
            }
            return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get' . $property}();
        }
        return null;
    }
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()}.");
        }
    }
152709
public function getData($property = AnDomain::ACCESS_PUBLIC, $default = null)
    {
        $description = $this->getEntityDescription();

        if (gettype($property) === 'integer') {
            $properties = $this->getEntityDescription()->getProperty();
            $access = (int) $property;
            $data = array();

            foreach ($properties as $name => $property) {
                if ($property->getReadAccess() >= $access) {
                    $data[$name] = $this->getData($name);
                }
            }

            return $data;
        }

        if (!$prop = $description->getProperty($property)) {
            return $this->get($property, $default);
        }

        $method = 'get'.ucfirst($property);

        if ($this->methodExists($method)) {
            $value = $this->$method();
        } else {
            $value = $this->get($property);
        }

        if (is_null($value)) {
            $value = $default;
        }

        return $value;
    }
121709
protected function getProperty($resource, $property)
    {
        if($property == '_self') {
            return $resource;
        }

        $propertyPath = explode('.', $property);

        if(count($propertyPath) > 1) {
            $property = array_shift($propertyPath);
            $newResource = $this->getProperty($resource, $property);
            if($newResource !== null) {
                $propertyPath = implode('.', $propertyPath);
                return $this->getProperty($newResource, $propertyPath);
            } else {
                return null;
            }
        } else {
            $method = sprintf('is%s', ucfirst($property));
            if(method_exists($resource, $method)) {
                return call_user_func(array($resource, $method));
            }

            $method = sprintf('get%s', ucfirst($property));
            if(method_exists($resource, $method)) {
                return call_user_func(array($resource, $method));
            }
        }

        throw new PropertyNotExistsException(sprintf(
            'Trying to call "get%s" or "is%s" on class "%s", but method does not exists. Maybe you spelled it wrong or you didn\'t add the getter for property "%s"',
            ucfirst($property),
            ucfirst($property),
            get_class($resource),
            $property
        ));
    }
1089196
public function getProperty($name, $property)
    {
        $result = null;
        if($this->has($name))
        {
            if(isset($this->_data[$name]->$property)) {
                $result = $this->_data[$name]->$property;
            }
        }

        return $result;
    }
1109284
public function get($property, $default = null)
    {
        return isset($this->__data[$property]) ? $this->__data[$property] : $default;
    }
1099248
public function getKeyedByPropertyMulti($property)
    {
        $keyed = [];
        foreach ($this as $model) {
            if (empty($keyed[$model->$property])) {
                $keyed[$model->$property] = [];
            }
            $keyed[$model->$property][] = $model;
        }
        return $keyed;
    }
208529
public function &__get($property)
    {
        $get[ $property ] = false;

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

        return $get[ $property ];
    }