Takes a human plugin code (acme.blog) and makes it authentic (Acme.Blog)
@param  string $id
@return string
488848
public function normalizeIdentifier($identifier)
    {
        foreach ($this->plugins as $id => $object) {
            if (strtolower($id) == strtolower($identifier)) {
                return $id;
            }
        }

        return $identifier;
    }
298194
public function generateEntityCodeAction($id = null)
    {
        $request = $this->getRequest();

        $id = $request->get($this->admin->getIdParameter());
        if ($id) {
            $subject = $this->admin->getObject($id);
            if (!$subject) {
                $error = sprintf('unable to find the object with id : %s', $id);

                return new JsonResponse(['error' => $error]);
            }
            try {
                $this->admin->checkAccess('edit', $subject); // TODO: is it necessary ? (we are not editing the entity)
            } catch (Exception $exc) {
                $error = $exc->getMessage();

                return new JsonResponse(['error' => $error]);
            }
        } else {
            $subject = $this->admin->getNewInstance();
        }

        $this->admin->setSubject($subject);

        $form = $this->admin->getForm();
        $form->setData($subject);
        $form->submit($request->request->get($form->getName()));
        $entity = $form->getData();

        $field = $request->query->get('field', 'code');
        $registry = $this->get('blast_core.code_generators');
        $generator = $registry::getCodeGenerator(get_class($entity), $field);
        try {
            $code = $generator::generate($entity);

            return new JsonResponse(['code' => $code]);
        } catch (\Exception $exc) {
            $error = $this->get('translator')->trans($exc->getMessage());

            return new JsonResponse(['error' => $error, 'generator' => get_class($generator)]);
        }
    }
1296140
public function get($id)
    {
        $request = new Request('customizations');
        $request->setIdParam(urlencode($id));

        $response = $this->client->get($request);

        $this->assertSuccessResponse($response);

        return $response->getData();
    }
1110288
protected function addPrefix($id)
    {
        return isset($this->urlDecorator) ? $this->urlDecorator->decorate($id) : $id;
    }
845036
private function getNamespacedId(string $id) : string
    {
        $namespaceVersion = $this->getNamespaceVersion();

        return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);
    }
54598
public static function getId($id) {
    $id = str_replace([' ', '_', '[', ']'], ['-', '-', '-', ''], Unicode::strtolower($id));

    // As defined in http://www.w3.org/TR/html4/types.html#type-name, HTML IDs can
    // only contain letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
    // colons (":"), and periods ("."). We strip out any character not in that
    // list. Note that the CSS spec doesn't allow colons or periods in identifiers
    // (http://www.w3.org/TR/CSS21/syndata.html#characters), so we strip those two
    // characters as well.
    $id = preg_replace('/[^A-Za-z0-9\-_]/', '', $id);

    // Removing multiple consecutive hyphens.
    $id = preg_replace('/\-+/', '-', $id);
    return $id;
  }
556641
protected function script($id, $params)
    {
        $handler       = $this->handler = 'handler' . str_random(4);
        $options       = array_replace_recursive($this->defaults()['pluginOptions'], $params['pluginOptions']);
        $decorated     = JavaScriptDecorator::decorate($options);
        return $this->init($id) . $handler . '.' . $this->pluginName . '(' . $decorated . ')';
    }
1240335
public function edit($id)
    {
        $blog = $this->repository->find($id);

        if (empty($blog)) {
            Cms::notification('Blog not found', 'warning');

            return redirect(route($this->routeBase.'.blog.index'));
        }

        return view('cms::modules.blogs.edit')->with('blog', $blog);
    }
510868
public function getContentById($id)
    {
        return $this->om->getRepository($this->configurationManager->getEntityClass('content'))->find($id);
    }
1241983
public function tokenById($id)
    {
        if ($user = $this->provider->retrieveById($id)) {
            return $this->jwt->fromUser($user);
        }
    }
1333462
protected function prepareUniqueId($id)
    {
        if (preg_match('/\[(.*)\]/', $id, $matches)) {
            $id = $this->getValue($matches[1]);
        }

        if (strtolower($id) === 'null') {
            $id = null;
        }

        if (filter_var($id, FILTER_VALIDATE_INT) !== false) {
            $id = (int) $id;
        }

        return $id;
    }
915027
public static function getById($id)
    {
        $result = null;
        $info = CldrData::getLanguageInfo($id);
        if (isset($info)) {
            $result = new Language($info);
        }

        return $result;
    }
899430
public function param($id)
    {
        if (isset($this->params[$id])) {
            return html_entity_decode(rawurldecode($this->params[$id]));
        }

        return false;
    }
702578
public function generateIdentifier( $id, $attributes = null )
    {
        $identifier = strtolower( $this->backendName )
            . $this->properties['location']
            . $id 
            . (
                ( $attributes !== null && !empty( $attributes ) ) 
                ? md5( serialize( $attributes ) ) 
                : ''
        );
        return urlencode( $identifier );
    }
903101
public static function fromString(string $id): self
    {
        list($contentId, $versionNo) = explode(':', $id);

        return new self((int) $contentId, (int) $versionNo);
    }
867098
protected function handleDomain(&$id) {
		if ($this->idDelimiter === null) {
			return $this->domain;
		}
		
		$delimiterPos = strpos($id, $this->idDelimiter);
		
		if ($delimiterPos === false) {
			return $this->domain;
		}
		
		$domain = substr($id, 0, $delimiterPos);
		$id     = substr($id, $delimiterPos + 1);
		
		return $domain;
	}
76472
public function AnimeMoreInfo(int $id): ?string
    {
        return $this->myanimelist->getAnimeMoreInfo(
            new Request\Anime\AnimeMoreInfoRequest($id)
        );
    }