PHPackages                             rayamedia/yima-static-uri-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rayamedia/yima-static-uri-helper

ActiveYima-core-module[Utility &amp; Helpers](/categories/utility)

rayamedia/yima-static-uri-helper
================================

View Helper to define configurable and on-demand statics uri to loading file assets or generating dynamic links.

122PHP

Since Jun 21Pushed 11y ago1 watchersCompare

[ Source](https://github.com/YiMAproject/yimaStaticUriHelper)[ Packagist](https://packagist.org/packages/rayamedia/yima-static-uri-helper)[ RSS](/packages/rayamedia-yima-static-uri-helper/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Static Uri Helper Module
========================

[](#static-uri-helper-module)

*this module is part of Yima Application Framework*

Why this module?
----------------

[](#why-this-module)

#### Configurable Statics Assets

[](#configurable-statics-assets)

Modules that need some assets can use a key for asset and url for source.

```
/*
 * Set from merged config
 */
 return array(
     'statics.uri' => array(
         'Twitter.Bootstrap' => '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/js/bootstrap.min.js',
     ),
     // ...
 );
```

```
/*
 * Set from any where that we can get helper object
 */
$staticsUri = $this->staticsUri('self'); // from within view you can get self object like this
$staticsUri->setPath('Key.Of.Uri', 'uri/path/to/target');
```

#### Stored Key Path

[](#stored-key-path)

```
echo $this->staticsUri('Twitter.Bootstrap');
// output: //cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/js/bootstrap.min.js
```

#### Default Stored Key Path

[](#default-stored-key-path)

```
echo $this->staticsUri('basepath');  // output in exp.: /app_dir
echo $this->staticsUri('serverurl'); // output in exp.: http://raya-media.com/
```

#### Generate Dynamic Uri

[](#generate-dynamic-uri)

```
$this->staticsUri('self')
   ->setPath('ondemand.rayamedia.server', '$protocol://raya-media.com');

echo $this->staticsUri('ondemand/rayamedia/server', array('protocol' => 'http'));
// output: http://raya-media.com
```

#### Generate Dynamic Uri With Default Values

[](#generate-dynamic-uri-with-default-values)

`$basepath` and `$serverurl` are default values.

```
$siteUser = 'payam';
$this->staticsUri('self')
   ->setVariable('user', $siteUser); // register default variable

// this uri not registered path
// we also can use this for registered path
echo $this->staticsUri(
   '$basepath/www/$user/some/$folder',
   array('folder' => 'media')
);
// output: /app_dir/www/payam/some/media

echo $this->staticsUri(
    '$basepath/www/$user/some/$folder',
    array('basepath' => '/alterpath', 'folder' => 'media')
 );
// output: /alterpath/www/payam/some/media

/* Pass variables by order
 * in this format helper don't support default variables
 */
echo $this->staticsUri(
    '$var1/www/$var2/some/$var3',
    '/alterpath', $user, $media
 );
// output: /alterpath/www/payam/some/media
```

Installation
------------

[](#installation)

Composer installation:

require `rayamedia/yima-static-uri-helper` in your `composer.json`

Or clone to modules folder

Enable module in application config

Support
-------

[](#support)

To report bugs or request features, please visit the [Issue Tracker](https://github.com/RayaMedia/yimastaticsUriHelper/wiki).

*Please feel free to contribute with new issues, requests and code fixes or new features.*

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f784f9dfb58e36b6a876f3057e5664bb904af71d30bb2023583118138dffe9a?d=identicon)[Payam](/maintainers/Payam)

---

Top Contributors

[![E1101](https://avatars.githubusercontent.com/u/427575?v=4)](https://github.com/E1101 "E1101 (16 commits)")

### Embed Badge

![Health badge](/badges/rayamedia-yima-static-uri-helper/health.svg)

```
[![Health](https://phpackages.com/badges/rayamedia-yima-static-uri-helper/health.svg)](https://phpackages.com/packages/rayamedia-yima-static-uri-helper)
```

###  Alternatives

[web3p/ethereum-tx

Ethereum transaction library in PHP.

193365.7k25](/packages/web3p-ethereum-tx)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
