Tribe__Field::__call( $name,  $arguments )


Source

File: src/Tribe/Field.php

		public function __call( string $name, array $arguments ) {
			$method_map = [
				'doField'             => 'do_field',
				'doFieldStart'        => 'do_field_start',
				'doFieldEnd'          => 'do_field_end',
				'doFieldLabel'        => 'do_field_label',
				'doFieldDivStart'     => 'do_field_div_start',
				'doFieldDivEnd'       => 'do_field_div_end',
				'doToolTip'           => 'do_tool_tip',
				'doFieldValue'        => 'do_field_value',
				'doFieldName'         => 'do_field_name',
				'doFieldAttributes'   => 'do_field_attributes',
				'doScreenReaderLabel' => 'do_screen_reader_label',
			];

			// Helper function to prepend the class name to the method name.
			$prepend_class = function ( string $method_name ): string {
				return sprintf( '%s::%s', __CLASS__, $method_name );
			};

			if ( array_key_exists( $name, $method_map ) ) {
				_deprecated_function(
					esc_html( $prepend_class( $name ) ),
					'4.3',
					esc_html( $prepend_class( $method_map[ $name ] ) )
				);

				return $this->{$method_map[ $name ]}( ...$arguments );
			} else {
				throw new BadMethodCallException( esc_html( "Method {$prepend_class( $name )} does not exist." ) );
			}
		}