@param string $mediaId
@param string $format

@return string
768356
public function getMediaUrl($mediaId, $format)
    {
        $media = $this->getMedia($mediaId);

        if ($media) {
            return $this->displayMediaManager->getMediaFormatUrl($media, $format);
        }

        return '';
    }
62220
public function get($mediaId)
    {
        $node     = 'get';
        $queryStr = ['media_id' => $mediaId];

        $res = $this->_get($node, $queryStr);

        return $res;
    }
512619
public static function getPort(ServerRequestInterface $request, string $format): string
    {
        switch ($format) {
            case 'canonical':
            case 'local':
                return (string) ($request->getUri()->getPort()
                    ?: ('https' === $request->getUri()->getScheme() ? 443 : 80));
            default:
                return '-';
        }
    }
582110
public function add($id, $mediaId)
    {
        return $this->getFactory()->createResult(
            $this->getApi()->addMediaToList($id, $mediaId)
        );
    }
261256
public function getMedia($mediaId)
    {
        $result = $this->httpGet(self::WECHAT_MEDIA_GET_PREFIX, [
            'access_token' => $this->getAccessToken(),
            'media_id' => $mediaId
        ]);
        return is_string($result) ? $result : false;
    }
1237181
public function remove($id, $mediaId)
    {
        return $this->getFactory()->createResult(
            $this->getApi()->removeMediaFromList($id, $mediaId)
        );
    }
1003731
public function getId($format = 'bytes')
    {
        return static::isUuid() && $format != false ? uuid($format, $this->id) : $this->id;
    }
905167
public function getDateTimeFormat(string $format='Y-m-d H:i:s')
    {
        $this->setDateTimeZone()->setDateTime();

        return $this->dateTime->format($format);
    }
168711
public function write($format = 'rtf')
	{
		$string = '';
		
		// if $format is a string
		if (is_string($format)) {
			$writer = new Writer();
			$string = $writer->write($this->root, $format);	
		} else {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, format, to be a string"
			);
		}
		
		return $string;
	}
558208
public function format(string $format)
    {
        $result = '';
        $length = \mb_strlen($format);

        $skip_next = false;

        // iterate for each character
        for ($index = 0; $index < $length; $index++) {
            $format_char = mb_substr($format, $index, 1);

            $result .= $this->getValueOfFormatCharacter($format_char, $skip_next);
        }

        // remove null bits if they exist
        return str_replace("\0", '', $result);
    }
47651
public function media($media, $format, $options = [])
    {
        if (!$media) {
            return '';
        }

        $provider = $this->getProvider($media);

        $format = $provider->getFormatName($media, $format);

        $options = $provider->getHelperProperties($media, $format, $options);

        return $this->templating->render($provider->getTemplate('helper_view'), [
             'media' => $media,
             'format' => $format,
             'options' => $options,
        ]);
    }
839036
final public function format($format)
    {
        if(is_null($this->value)) {
            return null;
        } else {
            return $this->value->format($format);
        }
    }
996501
public function format(int $format) : string
    {
        return PhoneNumberUtil::getInstance()->format($this->phoneNumber, $format);
    }
855323
public function transform($media)
    {
        if (null === $media || !$media instanceof \Apoutchika\MediaBundle\Model\MediaInterface) {
            return '';
        }

        return $media->getId();
    }
1014072
public function setFormat($format = null)
    {
        if ( ! is_null($format)) {
            self::checkFormat($format);
            $this->format = $format;
        }

        return $this;
    }
1078067
protected function getBoxHelperProperties(MediaInterface $media, $format, $options = [])
    {
        if (MediaProviderInterface::FORMAT_REFERENCE === $format) {
            return $media->getBox();
        }

        if (isset($options['width']) || isset($options['height'])) {
            $settings = [
                'width' => $options['width'] ?? null,
                'height' => $options['height'] ?? null,
            ];
        } else {
            $settings = $this->getFormat($format);
        }

        return $this->resizer->getBox($media, $settings);
    }
1094954
public function toString(string $format = null) : string
    {
        $operations = $this->operations;
        $operations[] = [ 'getImage', [ $format ] ];
        
        $driver = $this->getDriver();
        return array_reduce($operations, function ($carry, $item) use ($driver) {
            return $driver->{$item[0]}(...$item[1]);
        });
    }