Returns the field value

@param ParticleInterface $particle
@param FieldsCargo $cargo
@param string $name Field name
@param array $args Any arguments if available

@return mixed Field value
548130
protected static function getField(
        ParticleInterface $particle,
        FieldsCargo $cargo,
        string $name,
        array $args = []
    )/*: mixed*/
    {
        $name = Utils::findFieldName($cargo, $name);
        return $particle->attributes()->$name; // test with null.
    }
1334030
public function render($name, $args = []) {

        if(strstr($name, '::')) {

            $name = explode('::', $name);
        
        } else {

            $name = [$name, strtolower($name)];
        }


        if($this->set('module[controller]', $name[0])) {

            $module = $this->get('module');

            if(isset($module['name'])) {

                ob_start();

                if(method_exists($instance = $this->controller($module['name'], $name[0]), $name[1])) {

                    if($ref = new \ReflectionMethod($instance, $name[1])) {

                        $ref->invokeArgs($instance, $args);
                    }
                }

                $content = ob_get_contents();

                ob_end_clean();


                return $content;
            }
        }
    }
1077670
public static function fieldExists(FieldsCargo $cargo, string $name): bool
    {
        return array_key_exists($name, $cargo->fields);
    }
846028
public function execute($name, $args)
	{
	    if (!$this->__sock) {
	        return null;
	    }
	    
	    $args = (array) $args;
	    if(in_array($name, static::$keyCommands)) {
	        if ($this->options['prefix'] && strpos($args[0], $this->options['prefix']) === false) {
	            $args[0] = $this->options['prefix'] . $args[0];
	        }
	    }
	    
	    /* Build the Redis unified protocol command */
	    array_unshift($args, strtoupper($name));
	    $command = sprintf('*%d%s%s%s', count($args), CRLF, implode(array_map(array($this, 'formatArgument'), $args), CRLF), CRLF);
	    
	    /* Open a Redis connection and execute the command */
	    for ($written = 0; $written < strlen($command); $written += $fwrite) {
	        $fwrite = fwrite($this->__sock, substr($command, $written));
	        if ($fwrite === FALSE) {
	            throw new Exception('Failed to write entire command to stream');
	        }
	    }
	    
	    /* Parse the response based on the reply identifier */
	    $reply = trim(fgets($this->__sock, 512));
	    switch (substr($reply, 0, 1)) {
	        /* Error reply */
	        case '-':
	            throw new RedisException(substr(trim($reply), 4));
	            break;
	            /* Inline reply */
	        case '+':
	            $response = substr(trim($reply), 1);
	            break;
	            /* Bulk reply */
	        case '$':
	            $response = null;
	            if ($reply == '$-1') {
	                break;
	            }
	            $read = 0;
	            $size = substr($reply, 1);
	            do {
	                $block_size = ($size - $read) > 1024 ? 1024 : ($size - $read);
	                $response .= fread($this->__sock, $block_size);
	                $read += $block_size;
	            } while ($read < $size);
	            fread($this->__sock, 2); /* discard crlf */
	            break;
	            /* Multi-bulk reply */
	        case '*':
	            $count = substr($reply, 1);
	            if ($count == '-1') {
	                return null;
	            }
	            $response = array();
	            for ($i = 0; $i < $count; $i++) {
	                $bulk_head = trim(fgets($this->__sock, 512));
	                $size = substr($bulk_head, 1);
	                if ($size == '-1') {
	                    $response[] = null;
	                }
	                else {
	                    $read = 0;
	                    $block = "";
	                    do {
	                        $block_size = ($size - $read) > 1024 ? 1024 : ($size - $read);
	                        $block .= fread($this->__sock, $block_size);
	                        $read += $block_size;
	                    } while ($read < $size);
	                    fread($this->__sock, 2); /* discard crlf */
	                    $response[] = $block;
	                }
	            }
	            break;
	            /* Integer reply */
	        case ':':
	            $response = intval(substr(trim($reply), 1));
	            break;
	        default:
	            throw new RedisException("invalid server response: {$reply}");
	            break;
	    }
	    /* Party on */
	    return $response;
	}
221410
public function get($name)
    {
        // Check if field exists when it is not a collection
        if (!$this->isColl && !in_array($name, $this->getFields())) {
            throw new \InvalidArgumentException(sprintf(
                'Field "%s" not found in record class "%s"',
                $name,
                get_class($this)
            ));
        }
        return isset($this->data[$name]) ? $this->data[$name] : null;
    }
190659
public function get($id, $args = [])
    {
        $comment = get_comment($id);

        if (! $comment) {
            throw new UnexpectedValueException(sprintf('[W601] Could not find comment with ID %d', $id));
        }

        return $comment;
    }
808191
protected function invokeInaccessibleMethod($object, $name, array $args = [])
    {
        $method = new \ReflectionMethod($object, $name);
        $method->setAccessible(true);
        return $method->invokeArgs(is_object($object) ? $object : null, $args);
    }
12100
function get_value($name){
		if (!array_key_exists($name,$this->data)){
			LogMaster::log("Incorrect field name used: ".$name);
			LogMaster::log("data",$this->data);
			return "";
		}
		return $this->data[$name];
	}
1295803
public function getFieldValue($name)
    {
        $value = null;
        $field = $this->getField($name);
        if (null !== $this->getField($name)) {
            $value = (array_key_exists('value', $field) && null !== $field['value']) ? $field['value'] : null;
        }
        return $value;
    }
228415
public function createObject(string $name, array $args): JavaProxy
    {
        $this->protocol->createObjectBegin($name);
        $this->writeArgs($args);
        $this->protocol->createObjectEnd();

        return $this->getInternalResult();
    }
171898
public function getRoute($name, array $args = [])
    {
        if (!isset($this->names[$name])) {
            return null;
        }

        $route = $this->callbacks[$this->names[$name]];

        if (strpos($route->pattern, '(') === false) {
            // If we don't have any route parameters, just return the pattern
            // straight off. No need for any regex stuff.
            return $route->pattern;
        }

        // Convert all placeholders to %o = optional and %r = required
        $from    = ['/(\([^\/]+[\)]+[\?])/', '/(\([^\/]+\))/'];
        $to      = ['%o', '%r'];
        $pattern = preg_replace($from, $to, $route->pattern);

        $frags = explode('/', trim($pattern, '/'));
        $url   = [];

        // Loop thru the pattern fragments and insert the arguments
        foreach ($frags as $frag) {
            if ($frag == '%r') {
                if (!$args) {
                    // A required parameter, but no more arguments.
                    throw new Exception('Missing route parameters');
                }
                $url[] = array_shift($args);
                continue;
            }

            if ($frag == "%o") {
                if (!$args) {
                    // No argument for the optional parameter,
                    // just continue the iteration.
                    continue;
                }
                $url[] = array_shift($args);
                continue;
            }

            $url[] = $frag;
        }

        return '/' . implode('/', $url);
    }
995872
protected function getSymfonyFormFromParams($params, $name, $throwException = false)
    {
        $sfForm = $this->getParam($params, $name);

        if (null === $sfForm && false === $throwException) {
            return null;
        }

        if (!$sfForm instanceof SymfonyForm) {
            throw new \InvalidArgumentException(
                sprintf(
                    "%s parameter must be an instance of " .
                    "\Symfony\Component\Form\Form, instance of %s found",
                    $name,
                    is_object($sfForm) ? get_class($sfForm) : gettype($sfForm)
                )
            );
        }

        return $sfForm;
    }
898280
public function get_field( $name, $orderby = null ) {

		if ( Pod::$deprecated_notice ) {
			pods_deprecated( 'Pods::get_field', '2.0', 'Pods::field' );
		}

		$value = $this->obj->field(
			array(
				'name'       => $name,
				'orderby'    => $orderby,
				'deprecated' => true,
			)
		);

		if ( is_array( $value ) && ! empty( $value ) ) {
			if ( false === strpos( $name, '.' ) && ! isset( $value[0] ) ) {
				$value = array( $value );
			} elseif ( false !== strpos( $name, '.' ) && 1 == count( $value ) ) {
				// fix for single tableless fields
				$value = current( $value );
			}
		}

		return $value;
	}
155374
public static function findFieldName(FieldsCargo $cargo, string $name): string
        {
            $name = \Stringy\StaticStringy::upperCamelize($name);
            if(self::fieldExists($cargo, $name))
                return $name;
            throw new \Exception("Cannot resolve field name.");
        }
379599
public function shared(string $name, ...$args)
    {
        if (!isset(self::$share[$name])) {
            self::$share[$name] = $this->resolve($name, ...$args);
        }

        return self::$share[$name];
    }
1201584
public function getValue($object, FieldInterface $field)
    {
        try {
            switch (get_class($field)) {
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Property':
                    return $this->getPropertyValue($object, $field);
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Expression':
                    return $this->getExpressionValue($object, $field);
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Field':
                    return $this->getFieldValue($object, $field);
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Value':
                    return $field->getValue();
            }
        } catch (\Exception $e) {
            throw new \Exception(sprintf(
                'Error encountered when trying to determine value from object "%s"',
                get_class($object)
            ), null, $e);
        }

        throw new \RuntimeException(sprintf(
            'Unknown field type "%s" when trying to convert "%s" into a search document',
            get_class($field),
            get_class($object)
        ));
    }
1337756
public function resolveStatic(string $name, string $method, ...$args)
    {
        return $this->resolve($name . '::' . $method, ...$args);
    }