Get a field path.
@param  string $name
@return string
337100
protected function getPath($name) {
		$path = [];
		$matches = null;
		preg_match('/^([^\[]+)/', $name, $matches);
		$path[] = $matches[0];
		preg_match_all('/\[([^\]]*)\]/', $name, $matches);
		$path = array_merge($path, $matches[1]);

		return $path;
	}
1216624
public function getConfigurationPath($name = null)
    {
        if (! $name) {
            $appConfigDir = base_path('config') . '/';

            if (file_exists($appConfigDir)) {
                return $appConfigDir;
            } elseif (file_exists($path = __DIR__ . '/../config/')) {
                return $path;
            }
        } else {
            $appConfigPath = base_path('config') . '/' . $name . '.php';

            if (file_exists($appConfigPath)) {
                return $appConfigPath;
            } elseif (file_exists($path = __DIR__ . '/../config/' . $name . '.php')) {
                return $path;
            }
        }

        return '';
    }
731039
public static function getField(string $name = null): string
    {
        $name = $name ?: self::$currentName;

        return sprintf('<input type="text" name="%s">', $name);
    }
1092580
public function getFilePath($name, $extension = '.php')
    {
        $filename = trim(dotToPath($name), '/') . $extension;
        $file = null;
        foreach ($this->paths as $dir) {
            $realName = nPath($dir, $filename);
            if (file_exists($realName)) {
                $file = $realName;
                break;
            }
        }
        return $file;
    }
11956
public function getFieldType($name)
    {
        return $this->checkFieldExist($name)->types[$name] != null
            ? rtrim($this->types[$name], '[]')
            : null;
    }
877304
protected function getPath($name)
    {
        try {
            $location = $this->option('location') ?: config('modules.default_location');
        }
        catch (\Exception $e) {
            $location = config('modules.default_location');
        }

        $slug = $this->argument('slug');
        $module = Module::location($location)->where('slug', $slug);

        // take everything after the module name in the given path (ignoring case)
        $key = array_search(strtolower($module['basename']), explode('\\', strtolower($name)));

        if ($key === false) {
            $newPath = str_replace('\\', '/', $name);
        } else {
            $newPath = implode('/', array_slice(explode('\\', $name), $key + 1));
        }

        return module_path($slug, "$newPath.php", $location);
    }
755507
public Field getField(String name) {
    if (fieldMap == null) {
      return null;
    }
    return fieldMap.get(name);
  }
1267304
public function getField($name)
    {
        return (isset($this->fields[$name])) ? $this->fields[$name] : false;
    }
386480
public function getConfFilePath($name)
    {
        ($this->apache_base_path != null) ? $apache_base_path = $this->getPath($this->apache_base_path) :
            $apache_base_path = $this->getPath("/etc/apache2/");

        $suffix = "";
        if ($this->apache_version === "24") {
            $suffix = '/conf-available/' . $name . '.conf';
        } else {
            $suffix = '/conf.d/' . $name . '.conf';
        }

        return $apache_base_path . $suffix;

    }
158731
public function field($name)
    {
        return isset($this->_properties['fields'][$name])?
            $this->_properties['fields'][$name]:null;
    }
941043
function Field($name)
    {
        if (!array_key_exists($name, $this->fields))
            throw new \InvalidArgumentException($name . ' is not a valid field for '. $this->name);
        
        return $this->fields[$name];
    }
386762
public function getFieldByName($name)
    {
        foreach ($this->fieldList as $field) {
            if ($field->getFieldName() === $name) {
                return $field;
            }
        }

        return null;
    }
280711
protected static function getFilePath($name)
  {
    $path = str_replace("_", DIRECTORY_SEPARATOR, $name);
    $path = str_replace(__CLASS__, dirname(__FILE__), $path);

    return $path;
  }
1083968
public function getFieldCaption(string $name): string
    {
        $caption = $this->getFieldProperty($name, 'caption');

        if ($caption) {
            return $this->translate($caption);
        }

        return $name;
    }
846007
public function field($name)
    {
        foreach($this->data as $post)
        {
            $fieldType = get_field_object($name, $post->ID)['type'];

            if(in_array($fieldType, ['text']))
            {
                $post->$name = get_field($name, $post->ID);
            }
            elseif(in_array($fieldType, ['image']))
            {
                $post->$name = Data::arrayToObject(get_field($name, $post->ID));
            }
        }

        return $this->data;
    }
364797
public function getField($name)
    {
        if (array_key_exists($name, $this->fields)) {
            return $this->fields[$name];
        }
        else if (array_key_exists($name, $this->fieldAliases)) {
            $name = $this->fieldAliases[$name];
            return $this->fields[$name];
        }
        return null;
    }
7296
public function fieldByName($name)
    {
        if (strpos($name, '.') !== false) {
            list($name, $remainder) = explode('.', $name, 2);
        } else {
            $remainder = null;
        }

        foreach ($this as $child) {
            if (trim($name) == trim($child->getName()) || $name == $child->id) {
                if ($remainder) {
                    if ($child instanceof CompositeField) {
                        return $child->fieldByName($remainder);
                    } else {
                        $childClass = get_class($child);
                        user_error(
                            "Trying to get field '{$remainder}' from non-composite field {$childClass}.{$name}",
                            E_USER_WARNING
                        );
                        return null;
                    }
                } else {
                    return $child;
                }
            }
        }
        return null;
    }