This is a helper for the publicly-exposed methods named get...()
@param  string $fieldName
@return array
@throws \Exception
424099
private static function getField($fieldName)
    {
        $agentDetails = self::getAgentDetails();
        $values       = [];

        foreach ($agentDetails as $agent) {
            if (!isset($agent[$fieldName])) {
                throw new \Exception("Field name \"$fieldName\" not found, can't continue");
            }

            $values[] = $agent[$fieldName];
        }

        return array_values(array_unique($values));
    }
436192
public function get($field)
    {
        $client = $this->getClient();

        return $client->hget($this->getKey()->getName(), $field);
    }
576396
public function getFieldType($fieldName)
    {
        if (!array_key_exists($fieldName, $this->_fields)) {
            throw new \Exception("Field name \"$fieldName\" not found in document.");
        }

        return $this->_fields[$fieldName]->getType ();
    }
1291532
public function getField($fieldName)
    {
        if (array_key_exists($fieldName, $this->_message)) {
            return $this->_message[$fieldName];
        } else {
            return null;
        }
    }
206765
public function getFieldConstraints($fieldName)
    {
        $maybeConstraints = $this->annotations->lookupIn(
            [$fieldName, static::ANNOTATION_CONSTRAINTS]
        );

        if ($maybeConstraints->isNothing()) {
            return ArrayList::zero();
        }

        $constraints = Maybe::fromJust($maybeConstraints);

        if (is_array($constraints)) {
            return ArrayList::of($constraints);
        } elseif ($constraints instanceof IterableType) {
            return $constraints;
        }

        return ArrayList::of([$constraints]);
    }
700657
public function getErrors($fieldName=null)
    {
        if ($fieldName === null) {
            return $this->errors;
        }

        if (isset($this->errors[$fieldName])) {
            return $this->errors[$fieldName];
        }

        return [];
    }
418650
public function genFilePath($fieldName = null)
    {
        $id   = $this->countFiles($fieldName) + 1;
        $src  = null;
        $path = null;

        while (1) {
            $path = $id; //. "-" . System::generatePassword(12) ;
            $src  = $this->getFilePath($fieldName) . "/" . $path;
            if (!file_exists($src)) {
                break;
            }
            $id++;
        }

        return array(
            "src"  => $src,
            "path" => $path
        );
    }
152632
public function getFieldBc($fieldName)
    {
        if (array_key_exists($fieldName, $this->bcFields)) {
            return $this->bcFields[$fieldName];
        }

        return $fieldName;
    }
1345484
public function getFile($filename) {

        $filename = realpath(__DIR__.'/../headers/'.$filename.'.txt');

        if(!file_exists($filename)) throw new \Exception('Filename doesnt exist.');

        return file_get_contents($filename);
    }
1225023
public function getFormatter($fieldName)
    {
        if ($this->hasField($fieldName) === false) {
            return null;
        }

        return $this->mapping[$fieldName]['formatter'];
    }
630927
@SuppressWarnings("unchecked")
	public <T> T get(String fieldName) throws BeanException{
		if(Map.class.isAssignableFrom(beanClass)){
			return (T) ((Map<?, ?>)bean).get(fieldName);
		}else{
			try {
				final Method method = BeanUtil.getBeanDesc(beanClass).getGetter(fieldName);
				if(null == method){
					throw new BeanException("No get method for {}", fieldName);
				}
				return (T) method.invoke(this.bean);
			} catch (Exception e) {
				throw new BeanException(e);
			}
		}
	}
118737
public function getFieldMapping($fieldName)
    {
        if (!isset($this->fieldMappings[$fieldName])) {
            return false;
        }

        return $this->fieldMappings[$fieldName];
    }
277598
public function pluck($fieldName)
    {
        $isEmbeddedDocumentField = false !== strpos($fieldName, '.');

        $valueList = array();

        if ($isEmbeddedDocumentField) {
            // get result
            if ($this->isResultAsArray) {
                $cursor = clone $this;
                $documentObjectList = $cursor->asObject()->findAll();
                unset($cursor);
            } else {
                $documentObjectList = $this->findAll();
            }
            // get value of field
            foreach ($documentObjectList as $key => $documentObject) {
                $valueList[$key] = $documentObject->get($fieldName);
            }
        } else {
            // get result
            if ($this->isResultAsArray) {
                $documentArrayList = $this->findAll();
            } else {
                $cursor = clone $this;
                $documentArrayList = $cursor->asArray()->findAll();
                unset($cursor);
            }
            // get values of field
            $valueList = array_column($documentArrayList, $fieldName, '_id');
        }

        return $valueList;
    }
1308142
public function getTemplate(string $templateName): array
    {
        if (is_array($this->template))
            return $this->template;

        if (property_exists($this->getTemplateManager(), $templateName))
            return $this->getTemplateManager()->$templateName;

        $templateName = 'get' . ucfirst($templateName);
        if (! method_exists($this->getTemplateManager(), $templateName))
            trigger_error(sprintf('No template "%s" was found in %s Manager.', $templateName, get_class($this->getTemplateManager())), E_USER_ERROR);

        return $this->getTemplateManager()->$templateName();
    }
720298
public Method getGetter(String fieldName) {
		final PropDesc desc = this.propMap.get(fieldName);
		return null == desc ? null : desc.getGetter();
	}
1321389
private function getField($fieldname)
    {
        if (array_key_exists($fieldname, $this->colmodel)) {
            return $this->colmodel[$fieldname];
        } else {
            return false;
        }
    }
719513
public function getFieldXmlNode($fieldName)
    {
        return isset($this->fieldMappings[$fieldName]) ?
                $this->fieldMappings[$fieldName]['node'] : null;
    }