Get the registered class name for the given post type.

@param  string      $postType Post type identifier
@return string|null           Class name or null if no registration
356293
public function registered($postType)
    {
        if (isset($this->registeredMappings[$postType])) {
            return $this->registeredMappings[$postType];
        }

        return null;
    }
116780
public function getTypeClass($type)
    {
        if (isset($this->types[$type])) {
            return $this->types[$type];
        }

        if (\class_exists($type)) {
            return $type;
        }

        return null;
    }
438016
protected function getClassShortName(?string $className = null): string
	{
		$class = $className ?? static::class;

		$pos = strrpos($class, '\\');

		if($pos === false)
		{
			return $class;
		}

		return substr($class, $pos + 1);
	}
1060303
public function getClassname($type)
    {
        $types = $this->types();

        if (isset($types[$type])) {
            return $types[$type];
        }

        return static::DEFAULT_CLASSNAME;
    }
189711
private function _get_post_types(){
    global $wpdb;

    $query = sprintf('SELECT * FROM %s ORDER BY id',MF_TABLE_POSTTYPES);
    $posttypes = $wpdb->get_results( $query, ARRAY_A );
    return $posttypes;
  }
173525
public function getPostalInfo($type)
    {
        if (!in_array($type, [PostalInfo::TYPE_INT, PostalInfo::TYPE_LOC])) {
            throw new UnexpectedValueException(sprintf(
                'The value of the parameter \'type\' must be set to \'%s\' or \'%s\'.',
                PostalInfo::TYPE_INT,
                PostalInfo::TYPE_LOC
            ));
        }

        $query = sprintf('//epp:epp/epp:response/epp:resData/contact:infData/contact:postalInfo[@type=\'%s\']', $type);
        $node = $this->getFirst($query);
        if ($node === null) {
            return null;
        }

        return new PostalInfoHelper($this, $node);
    }
308697
protected function getClassFromType($entry)
    {
        $class = null;

        foreach ($this->type_map as $type => $type_class) {
            if (preg_match($type, $entry) === 1) {
                $class = $type_class;
                break;
            }
        }

        return $class;
    }
27565
public static function get_post_types() {
		$items = [];

		// Get the post types.
		$post_types = get_post_types(
			[
				'public' => true,
			],
			'objects'
		);

		// Build the array.
		foreach ( $post_types as $post_type ) {
			$items[ $post_type->name ] = $post_type->labels->name;
		}

		return $items;
	}
1255121
public function post_type_link( $post_link, $post ) {

		if ( empty( $post ) || $this->object_type != $post->post_type ) {
			return $post_link;
		}

		$post_link = get_site_url() . '/';

		if ( false === strpos( $post->post_title, '*' ) ) {
			$post_link .= trim( $post->post_title, '/ ' ) . '/';
		}

		return $post_link;
	}
1202323
public static function getTypeName($type = null)
    {
        $result = [
            Item::TYPE_PERMISSION => 'Permission',
            Item::TYPE_ROLE => 'Role',
        ];
        if ($type === null) {
            return $result;
        }

        return $result[$type];
    }
57023
private function register_post_type() {
		$post_type            = $this->get_post_type();
		$this->_post_type_obj = register_post_type( $post_type, $this->get_post_type_args() );
		if ( is_wp_error( $this->_post_type_obj ) ) {
			$this->app->log( $this->_post_type_obj );

			return;
		}
		add_filter( "views_edit-{$post_type}", function ( $views ) {
			unset( $views['mine'] );
			unset( $views['publish'] );

			return $views;
		} );
		add_filter( "bulk_actions-edit-{$post_type}", function ( $actions ) {
			unset( $actions['edit'] );

			return $actions;
		} );
		add_filter( "manage_edit-{$post_type}_sortable_columns", function ( $sortable_columns ) {
			return $this->manage_posts_columns( $sortable_columns, true );
		} );
	}
1157554
protected function get_field_class_name($fieldtype) {
        global $CFG;

        $fieldtype = trim($fieldtype);
        require_once($CFG->dirroot . '/mod/data/field/' . $fieldtype . '/field.class.php');
        return 'data_field_' . $fieldtype;
    }
260648
public function getClassForType(string $type):?string
    {
        if (isset($this->typeMap[$type])) {
            return $this->typeMap[$type];
        }

        return null;
    }
365353
public function getShortName()
    {
        $value = $this->getValue();
        if (empty($value) || !ClassInfo::exists($value)) {
            return null;
        }
        return ClassInfo::shortName($value);
    }
725192
public static function GetTypeName( $value ) : string
   {

      if ( \is_null( $value ) )
      {
         return Type::PHP_NULL;
      }

      if ( \is_object( $value ) )
      {
         return \get_class( $value );
      }

      if ( \is_string( $value ) )
      {
         return Type::PHP_STRING;
      }

      if ( \is_int( $value ) )
      {
         return Type::PHP_INTEGER;
      }

      if ( \is_bool( $value ) )
      {
         return Type::PHP_BOOLEAN;
      }

      if ( \is_double( $value ) )
      {
         return Type::PHP_DOUBLE;
      }

      if ( \is_float( $value ) )
      {
         return Type::PHP_FLOAT;
      }

      if ( \is_resource( $value ) )
      {
         return Type::PHP_RESOURCE;
      }

      if ( \is_array( $value ) )
      {
         return Type::PHP_ARRAY;
      }

      return Type::PHP_UNKNOWN;

   }
724814
public static function get_post_class( $post_type, $post_class = '\Timber\Post' ) {
		$post_class = apply_filters('Timber\PostClassMap', $post_class);
		$post_class_use = '\Timber\Post';

		if ( is_array($post_class) ) {
			if ( isset($post_class[$post_type]) ) {
				$post_class_use = $post_class[$post_type];
			} else {
				Helper::error_log($post_type.' not found in '.print_r($post_class, true));
			}
		} elseif ( is_string($post_class) ) {
			$post_class_use = $post_class;
		} else {
			Helper::error_log('Unexpeted value for PostClass: '.print_r($post_class, true));
		}

		if ( $post_class_use === '\Timber\Post' || $post_class_use === 'Timber\Post' ) {
			return $post_class_use;
		}

		if ( !class_exists($post_class_use) || !is_subclass_of($post_class_use, '\Timber\Post') ) {
			Helper::error_log('Class '.$post_class_use.' either does not exist or implement \Timber\Post');
			return '\Timber\Post';
		}

		return $post_class_use;
	}
318535
function getClassName() {
    	preg_match('/\[\s\<\w+?>\s([\w\\\\]+)/s', $this->__toString(), $matches);
    	$class = isset($matches[1]) ? $matches[1] : null;
        if(in_array($class, [ 'array', 'string', 'char', 'bool', 'boolean', 'int', 'integer', 'double', 'float', 'real', 'mixed', 'number', 'null', 'callable', 'callback' ])) {
            return null;
        }
        return $class;
    }