Returns the name of a class using get_class with the namespaces stripped.

@param object|string $object Object or Class Name to retrieve name

@return string Name of class with namespaces stripped
192582
public static function getClassName($object = null)
    {
        if (!is_object($object) && !is_string($object)) {
            return false;
        }

        $class = explode('\\', (is_string($object) ? $object : get_class($object)));
        return $class[count($class) - 1];
    }
1301738
public static function get($object) {
        $class = $object->name;

        /** @var \Gcs\Framework\Core\Orm\Entity\Entity $class */
        $class = new $class();

        $request = Request::instance();

        if (($class->getForm() == '' && $request->data->form == true) || isset($request->data->post[$class->getForm()])) {
            switch ($request->data->method) {
                case 'get' :
                    $class->hydrate(strtolower($class->name()) . '_');
                    $class->beforeInsert();
                    break;

                case 'post' :
                    $class->hydrate(strtolower($class->name()) . '_');
                    $class->beforeInsert();
                    break;

                case 'put' :
                    $class->hydrate(strtolower($class->name()) . '_');
                    $class->beforeUpdate();
                    break;

                case 'patch' :
                    $class->hydrate(strtolower($class->name()) . '_');
                    $class->beforePatch();
                    break;

                case 'delete' :
                    $class->hydrate(strtolower($class->name()) . '_');
                    $class->beforeDelete();
                    break;
            }

            $class->check();
        }

        return $class;
    }
1290595
public function get_title( $object ) {
		return $this->field->options( 'query_users' )
			? $object->data->display_name
			: get_the_title( $object );
	}
569298
public static function getRealNamespace($class)
    {
        if (($lastNsPos = strrpos($realClass = self::getRealClass($class), '\\')) !== false) {
            return substr($realClass, 0, $lastNsPos);
        }
    }
653590
public function getMetadataForObject($object)
    {
        if (!$object instanceof StructureBehavior) {
            return;
        }

        $documentMetadata = $this->metadataFactory->getMetadataForClass(get_class($object));
        $structure = $this->structureFactory->getStructureMetadata(
            $documentMetadata->getAlias(),
            $object->getStructureType()
        );

        return $this->getMetadata($documentMetadata, $structure);
    }
151673
private function readAppDescription($object): string
    {
        $annotations = annotationsOf($object);
        if (!$annotations->contain('AppDescription')) {
            return '';
        }

        return $annotations->firstNamed('AppDescription')->getValue() . "\n";
    }
161599
public static function methods($object)
    {
        if (!self::isDebug()) {
            return false;
        }

        $methodst = self::i()->_getMethods($object);
        if (is_string($object)) {
            $className = $object;
        } else {
            $className = get_class($object);
        }

        return self::i()->dump($methodst, '&lt;! methods of "' . $className . '" !&gt;');
    }
962055
public function getLabeledPropertiesToBeSet($object)
    {
        return array_filter($this->getLabeledProperties(), function (LabeledPropertyMetadata $labeledPropertyMetadata) use ($object) {
            return true === $labeledPropertyMetadata->getValue($object);
        });
    }
741892
public static function functions($object)
    {
        return (is_array($object) || $object instanceOf \stdClass)
            ? static::keys(static::filter($object, function ($item) {
                return static::isFunction($item);
            }))
            : static::sortBy(get_class_methods($object), function($name) {
                return $name;
            });
    }
408218
protected function getMatchingClassNameIn($object, array $classList) : ?string
    {
        $actualClassList = array_merge(
            [get_class($object)],
            class_implements($object),
            class_uses($object)
        );
        $parentClass = get_parent_class($object);
        while (false !== $parentClass) {
            $actualClassList[] = $parentClass;
            $parentClass = get_parent_class($parentClass);
        }

        $matchList = array_intersect($actualClassList, $classList);

        return array_pop($matchList);
    }
357825
public function get_object_label( $object ) {
		if ( ! $this->do_type_label ) {
			return '';
		}

		$post_type_obj = get_post_type_object( $object->post_type );
		$label = isset( $post_type_obj->labels->singular_name ) ? $post_type_obj->labels->singular_name : $post_type_obj->label;

		return ' &mdash; <span class="object-label">'. $label .'</span>';
	}
828335
public static function classInheritance($object){

        $class = new ReflectionClass($object);
        $classNames = [$class->getName()];

        while($class = $class->getParentClass()){
            $classNames[] = $class->getName();
        }

        return $classNames;

    }
1243178
private function resolveClass($object)
    {
        if (!$object instanceof Proxy) {
            return get_class($object);
        }

        // If this is a proxy resolve using class metadata.
        return $this
            ->em
            ->getClassMetadata(get_class($object))
            ->getReflectionClass()
            ->getName();
    }
389946
protected function getObjectDisplay($object = null)
    {
        if (!$object || !$object->isInDB()) {
            return '';
        }

        // Use image tag
        // TODO Use CMSThumbnail instead to limit max size, blocked by DataDifferencerTest and GC
        // not playing nice with mocked images
        if ($object instanceof Image) {
            return $object->getTag();
        }

        // Format title
        return $object->obj('Title')->forTemplate();
    }
401169
public static function urlEncodeShortName($object) {
        $classname = static::getShortName($object);
        $explode   = preg_replace("/([a-z]{1})([A-Z]{1})/", "$1-$2", $classname);
        return strtolower($explode);
    }
580997
public static function getObjectClass($object)
    {
        if(is_object($object))
        {
            if($object instanceof IBean)
            {
                return get_parent_class($object);
            }
            else
            {
                return get_class($object);
            }
        }
        else
        {
            return (string)$object;
        }
    }
192849
private static function getPropertyMapping($object)
    {
        $mapping = array();
        $reflection = new \ReflectionClass($object);

        // Create a default property mapping by getting the properties
        foreach ($reflection->getProperties() as $property) {
            $name = $property->getName();
            $setterMethod = 'set' . ucfirst($name);

            if (method_exists($object, $setterMethod) || $property->isPublic()) {
                $mapping[$name] = $name;
            }
        }

        // If the getPropertyMapping method exists, merge it with the
        // existing mapping.
        //
        // This comes last because it has higher priority than the default
        // mapping.
        if (method_exists($object, 'getPropertyMapping')) {
            $mapping = array_merge($mapping, $object->getPropertyMapping());
        }

        // Filter any properties that are mapped to null
        foreach ($mapping as $destination => $source) {
            if (!$source) {
                unset($mapping[$destination]);
            }
        }

        return $mapping;
    }