Get a Log object by Id.
@param $value
@return Log|null
429703
public function getById(int $value)
    {
        // This is the primary key, so try and get from cache:
        $cacheResult = $this->cacheGet($value);

        if (!empty($cacheResult)) {
            return $cacheResult;
        }

        $rtn = $this->where('id', $value)->first();
        $this->cacheSet($value, $rtn);

        return $rtn;
    }
858208
public function value( $value = NULL ){
		if( is_null( $value ) )
			return $this->value;
		$this->value	= $value;
	}
578796
public function extract($value, $object = null)
    {
        if ($value instanceof Collection || is_array($value)) {
            $values = [];
            foreach ($value as $collItem) {
                $values[] = $this->extract($collItem, $object);
            }
            return $values;
        }

        if ($value instanceof Location) {
            return $value->toString();
        }

        if (0 === strpos($value, '{')) {
            return $value;
        }
        if ($value) {
            $data = $this->geoClient->queryOne($value);
            return $data['id'];
        } else {
            return;
        }
    }
383295
public function setScope(?string $value) : Log
    {

        if ($this->data['scope'] !== $value) {
            $this->data['scope'] = $value;
            $this->setModified('scope');
        }

        return $this;
    }
109798
public function getLogById($id)
    {
        $log = $this->createQueryBuilder()
                    ->select('l.*')
                    ->from($this->tableName, 'l')
                    ->where('l.id = :id')
                    ->setParameter(':id', $id)
                    ->execute()
                    ->fetch();

        if (false !== $log) {
            return new Log($log);
        }
    }
608080
public static function getType( $value )
    {
        $type = gettype($value);
        switch( $type ){
        case 'string':
            return $type . '(' . strlen($value) . ')';
            break;
        case 'integer':
        case 'float':
        case 'boolean':
            return $type . '(' . $value . ')';
            break;
        case 'NULL':
        case 'unknown type':
            return $type;
            break;
        case 'array':
            return $type . '(' . count($value) . ')';
            break;
        case 'object':
            if ( $value instanceof \Countable ){
                return get_class( $value ) . '(' . count($value) . ')';
            }
            elseif ( $value instanceof HashableInterface ){
                return get_class( $value ) . '(hash=' . $value->hash() . ')';
            }
            return get_class( $value );
            break;
        }
        return '';
    }
1276005
protected function query($value)
    {
        /** @var EntityManagerInterface $objectManager */
        $objectManager = $this->getOption('object_manager');
        /** @var string $targetClass */
        $targetClass = $this->getOption('target_class');

        /** @var \PServerCore\Entity\Repository\User $repo */
        $repo = $objectManager->getRepository($targetClass);

        return $repo->isUserValid4UserName($value);
    }
526705
public static function getType($value)
    {
        if (preg_match(self::REGEXP_TCP, $value)) {
            return self::TYPE_TCP;
        }

        if (preg_match(self::REGEXP_SSL, $value)) {
            return self::TYPE_SSL;
        }

        if (preg_match(self::REGEXP_UNIX, $value)) {
            return self::TYPE_UNIX;
        }

        return null;
    }
881112
public function serialize($value): string
    {
        $id = $this->entityManager->getClassMetadata($this->className)->getIdentifierValues($value);

        return (string) reset($id);
    }
164169
public function get($key, $value = null)
    {
        return $this->queryBag->key($key, $value, true);
    }
1141967
public function extract($value)
    {
        if ($this->nullable && $value === null) {
            return null;
        }

        $return = [];
        if (is_array($value) || $value instanceof \Traversable) {
            foreach ($value as $key => $object) {
                $return[$key] = $this->hasOneStrategy->extract($object);
            }
        } else {
            throw new Exception\InvalidArgumentException(sprintf(
                'Value must be null (only if nullable option is enabled), or an array, or a Traversable: "%s" given',
                is_object($value) ? get_class($value) : gettype($value)
            ));
        }

        return $return;
    }
871794
private function getIndividualValue($value)
    {
        if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
            return $value;
        }

        return $this->em->getUnitOfWork()->getSingleIdentifierValue($value);
    }
43304
public static function getMessageForError($value)
    {
        if (self::isValidName($value)) {
            $value = self::getNameValue($value);
        }

        return isset(self::$messages[$value]) ? self::$messages[$value] : null;
    }
179881
protected function getRestoredPropertyValue($value)
    {
        if (! $value instanceof ModelIdentifier) {
            return $value;
        }

        return is_array($value->id)
                ? $this->restoreCollection($value)
                : $this->restoreModel($value);
    }
108556
private function toDateTimeObject($value)
    {
        $datetime = null;
        
        switch (true) {
            case $value instanceof \DateTime:
                $datetime = new DateTime($value->format(\DateTime::RFC3339));
                break;
            case is_numeric($value):
                $datetime = new DateTime(sprintf('@%d', $value));
                break;
            case is_string($value):
                $datetime = new DateTime($value);
                break;
        }
        
        return $datetime;
    }
457756
public function setScopeId(?string $value) : Log
    {

        if ($this->data['scope_id'] !== $value) {
            $this->data['scope_id'] = $value;
            $this->setModified('scope_id');
        }

        return $this;
    }
454720
protected function getIdFromValue(string $value)
    {
        try {
            if (null !== $item = $this->getIriConverter()->getItemFromIri($value, ['fetch_data' => false])) {
                return $this->getPropertyAccessor()->getValue($item, 'id');
            }
        } catch (InvalidArgumentException $e) {
            // Do nothing, return the raw value
        }

        return $value;
    }