Returns an array of tag names for the given Taggable resource.

@param Taggable  $resource   Taggable resource
492909
public function getTagNames(Taggable $resource)
    {
        $names = array();

        if (sizeof($resource->getTags()) > 0) {
            foreach ($resource->getTags() as $tag) {
                $names[] = $tag->getName();
            }
        }

        return $names;
    }
1308167
protected function getAvailableTypes(string $resource)
    {
        $cached = $this->cache['available_types'][$resource] ?? null;
        if ($cached !== null) {
            return $cached;
        }

        $types = $this->resources[$resource]['handlers']['GET'] ?? [];
        $types = (is_array($types))
            ? array_filter(array_replace($this->default_content_type, $types))
            : [];

        $this->cache['available_types'][$resource] = $types;
        return $types;
    }
31314
public static function toArray($resource) {
		if (self::isArray($resource)) {
			return $resource;

		} else if (self::isObject($resource)) {
			return self::buildArray($resource);

		} else if (self::isJson($resource)) {
			return json_decode($resource, true);

		} else if ($ser = self::isSerialized($resource)) {
			return self::toArray($ser);

		} else if ($xml = self::isXml($resource)) {
			return self::xmlToArray($xml);
		}

		return $resource;
	}
824604
public function deleteTagging(Taggable $resource)
    {
        $taggingList = $this->em->createQueryBuilder()
            ->select('t')
            ->from($this->taggingClass, 't')

            ->where('t.resourceType = :type')
            ->setParameter('type', $resource->getTaggableType())

            ->andWhere('t.resourceId = :id')
            ->setParameter('id', $resource->getTaggableId())

            ->getQuery()
            ->getResult();

        foreach ($taggingList as $tagging) {
            $this->em->remove($tagging);
        }
    }
1549
public function indexFields(Resource $resource): array
    {
        return $this->resourceFields($resource)->map(function (Field $field) {
            if (!$field->computed()) {
                return $field->attribute;
            }

            return $field->name;
        })->unique()->all();
    }
750135
public function getReleaseByTagName(string $tag): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/tags/:tag',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $tag));
    }
1062
public function tagsByName($name)
    {
        $tags = array();
        foreach ($this->tags() as $tag) {
            if ($name === $tag->name()) {
                $tags[] = $tag;
            }
        }

        return $tags;
    }
1242651
protected function getFilename(Resource $resource)
    {
        return sprintf(
            '%s/%s%s',
            $this->dir,
            md5(serialize($resource)),
            $this->suffix
        );
    }
937657
public function getResource($resource)
    {
        if ($this->resourceExists($resource)) return $this->_resources[$resource];

        throw new ContainerResourceNotFoundException('Resource ' . $resource . ' does not exist in the Container');
    }
595563
public function loadResource($resource)
    {
        // If possible use our custom xliff loader, so we get metadata
        if (in_array($resource['format'], array('xliff', 'xlf'))) {
            return $this->container->get('liip.translation.xliff.loader')->load($resource['path'], $resource['locale'], $resource['domain']);
        }

        // Search for an other services
        foreach ($this->loaderIds as $serviceId => $formats) {
            if (!is_array($formats)) {
                $formats = array($formats);
            }
            foreach ($formats as $format) {
                if ($resource['format'] === $format) {
                    return $this->container->get($serviceId)->load($resource['path'], $resource['locale'], $resource['domain']);
                }
            }
        }

        throw new \RuntimeException("Not service found to load {$resource['path']}");
    }
56496
private function formatName(PuliResource $resource)
    {
        $name = $resource->getName();

        if ($resource->hasChildren()) {
            return '<c1>'.$name.'</c1>';
        }

        return $name;
    }
893755
public static function toJson($resource) {
		if (self::isJson($resource)) {
			return $resource;
		}

		if ($xml = self::isXml($resource)) {
			$resource = self::xmlToArray($xml);

		} else if ($ser = self::isSerialized($resource)) {
			$resource = $ser;
		}

		return json_encode($resource);
	}
399205
protected function renderTag(Resource $resource) {
		$tag = new Tag('link');
		
		$tag->rel  = 'stylesheet';
		$tag->type = 'text/css';
		$tag->href = $resource->getUrl();
		
		return $tag->render();
	}
605977
public function loadTagging(Taggable $resource)
    {
        $tags = $this->getTagging($resource);
        $this->replaceTags($tags, $resource);
    }
898108
protected static function fetchUserTags()
    {
        $files = Bus::fetch('resources/tags', false);
        //
        if (!is_null($files)) {
            foreach (Bus::fetch('resources/tags', false) as $file) {
                Bus::need($file);
            }
        }
    }
124473
public function getFromArray(
        array $resources
    ) {
        $root = (empty($resources[0])) ? null : $resources[0];
        $siteId = (empty($resources[1])) ? null : $resources[1];
        $pages = (empty($resources[2])) ? null : $resources[2];
        $pageType = (empty($resources[3])) ? null : $resources[3];
        $pageName = (empty($resources[4])) ? null : $resources[4];

        return $this->get(
            $root,
            $siteId,
            $pages,
            $pageType,
            $pageName
        );
    }
605843
public function getAllControllerFromResource($resource)
    {
        $controllerDir = $this->kernel->locateResource($resource);

        $finder = new Finder();
        $finder->name('*Controller.php')->in($controllerDir);

        $controllers = array();
        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            $controllers[] = $this->getReflectionClassFromFile($file);
        }
        $controllers[] = new \ReflectionClass(UserController::class);
        $controllers[] = new \ReflectionClass(ProfileController::class);
        $controllers[] = new \ReflectionClass(HomeController::class);

        return $controllers;
    }