Return item bookmarks.

@param string $class

@return \Illuminate\Database\Eloquent\Relations\BelongsToMany
543463
public function bookmarks($class = __CLASS__)
    {
        return $this->morphedByMany($class, config('follow.morph_prefix'), config('follow.followable_table'))
                    ->wherePivot('relation', '=', Follow::RELATION_BOOKMARK)
                    ->withPivot('followable_type', 'relation', 'created_at');
    }
423347
private function resolveResource($class)
    {
        if (array_key_exists($class, $this->cache)) {
            return $this->cache[$class];
        }

        $found = null;

        foreach ($this->resourceRegistry as $resource) {
            if ($resource->getModel() === $class) {
                $found = $resource;

                break;
            }
        }

        return $this->cache[$class] = $found;
    }
1199503
public function getIconVendor($class) {
		foreach ($this->_config['iconVendorPrefixes'] as $iconVendorPrefix) {
            $regex = sprintf('/^(?<!<"\')(%s[\s-]){1,}/', $iconVendorPrefix, $iconVendorPrefix);
			if (preg_match($regex, $class)) {
				return $iconVendorPrefix;
			}
		}

		return null;
	}
200357
protected function getMappableFieldsForClass($class)
    {
        $singleton = singleton($class);
        $fields = (array)$singleton->fieldLabels(false);
        foreach ($fields as $field => $label) {
            if (!$singleton->hasField($field)) {
                unset($fields[$field]);
            }
        }
        return $fields;
    }
856562
public static function getClassProperties($class)
    {
        $properties = [];
        Logger::log('Extracting annotations properties from class ' . $class);
        $selfReflector = new \ReflectionClass($class);
        if (false !== $selfReflector->getParentClass()) {
            $properties = self::getClassProperties($selfReflector->getParentClass()->getName());
        }
        $properties = array_merge($properties, self::extractProperties($selfReflector));
        return $properties;
    }
536027
public function getObjects($class = null)
    {
        if ($class === null) {
            return $this->objects;
        }

        $objects = [];

        foreach ($this->objects as $object) {
            if ($object instanceof $class) {
                $objects[] = $object;
            }
        }

        return $objects;
    }
481550
public function fetchAllObj(string $class = null): array
    {
        if (!$this->wasExecuted()) {
            $this->exec();
        }

        if ($class === null) {
            return $this->getAdapter()->getStatement()->fetchAll(\PDO::FETCH_OBJ);
        } else {
            $objectInstances = [];

            foreach ($this->fetchAll() as $r) {
                $objectInstances[] = new $class($r);
            }

            return $objectInstances;
        }
    }
103502
public function getHooks($class)
    {
        $hooks = array();

        foreach (get_class_methods($class) as $method) {
            if (strpos($method, 'hook') === 0) {
                $hooks[] = $method;
            }
        }

        return $hooks;
    }
1038970
public static function getByClass( $class )
	{
		$results = [];
		foreach ( static::$globals as $k => $v )
			if ( $v instanceof $class )
				$results[$k] = $v;
		return $results;
	}
30023
public function getForeignItems(Saveable $class, $relation_details)
        {
            list ($query, $item_class, $item_column) = $this->generateForeignItemsQuery($class, $relation_details);
            if (!$item_class) {
                $items = array();
                $resultset = $this->rawSelect($query);
                if ($resultset) {
                    $column = "{$this->getB2DBName()}." . $relation_details['column'];
                    while ($row = $resultset->getNextRow()) {
                        $items[] = $row->get($column);
                    }
                }
                return $items;
            } elseif (!$relation_details['manytomany']) {
                return $this->select($query);
            } else {
                $resultset = $this->rawSelect($query);

                return $this->populateFromResultset($resultset, $item_class, $item_column, $item_column);
            }
        }
413185
public function findAttributeClass($class)
    {
        if ($this->offsetExists('class')) {
            $matches = [];

            foreach ($this->storage[ 'class' ] as $key => $value) {
                if (preg_match("/\b$class\b/i", $value)) {
                    $matches[] = $value;
                }
            }

            if (count($matches)) {
                return $matches;
            }

        }

        return false;
    }
710455
public function votes($class = __CLASS__)
    {
        return $this->morphedByMany($class, config('follow.morph_prefix'), config('follow.followable_table'))
                    ->wherePivotIn('relation', [Follow::RELATION_UPVOTE, Follow::RELATION_DOWNVOTE])
                    ->withPivot('followable_type', 'relation', 'created_at');
    }
1244260
public static function getClassAnnotations($class)
    {
        $annotationBag = Bridge\Loader::getInstance()->getClassAnnotations($class);
        $annotationBag = self::explodeNamespaces($annotationBag);

        return new ConfigObject($annotationBag);
    }
717370
protected function getClassFilesetAnnotations($class) {
    $filesets = [];
    $methods = get_class_methods($class);
    foreach ($methods as $method_name) {
      $reflectionMethod = new \ReflectionMethod($class, $method_name);
      $annotations = $this->annotationsReader->getMethodAnnotation($reflectionMethod, 'Acquia\Blt\Annotations\Fileset');
      if ($annotations) {
        $filesets[$annotations->id] = $method_name;
      }
    }

    return $filesets;
  }
211045
public function getMany($relatedClass)
    {
        $table = ucfirst($relatedClass::getTable());
        $column = "shared{$table}List";
        return static::wrap($this->bean->$column, $relatedClass);
    }
927032
public function getByType($class)
    {
        $class = array_map('strtolower', (array)$class);

        $out = array_filter($this->_items, function ($assoc) use ($class) {
            list(, $name) = namespaceSplit(get_class($assoc));

            return in_array(strtolower($name), $class, true);
        });

        return array_values($out);
    }
1319345
public function getFor($class, $strict = false)
    {
        if (isset($this->items[$class])) {
            return $this->items[$class];
        } elseif (!$strict) {
            foreach ($this->items as $blueprint) {
                if (is_subclass_of($class, $blueprint->class, true)) {
                    return $blueprint;
                }
            }
        }
        return null;
    }