PHPackages                             pendalff/yii-csol - 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. pendalff/yii-csol

ActiveYii-extension

pendalff/yii-csol
=================

Implement Object Literal methods for client script Yii

011PHP

Since Jul 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/pendalff/yii-csol)[ Packagist](https://packagist.org/packages/pendalff/yii-csol)[ RSS](/packages/pendalff-yii-csol/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii ClientScript ObjectLiteral
==============================

[](#yii-clientscript-objectliteral)

Using objects for organize your client script code. The implementation of the basic methods Object Literal for framework Yii CClientScript.

Read more about this:

- [Markup-based unobtrusive comprehensive DOM-ready execution](http://paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/)
- [Show love to the object literal](http://christianheilmann.com/2006/02/16/show-love-to-the-object-literal/)
- [Использование объектов для красивой структуры кода в JavaScript](http://habrahabr.ru/post/111290/)

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

[](#installation)

Copy this component to extensions/yii-csol or add as submodule:

```
git submodule add git://github.com/smaknsk/yii-csol.git extensions/yii-csol
```

Add to protected/config/main.php

```
	'components' => array(
		...
		'clientScript' => array(
			'class' => 'ext.yii-csol.YiiCSOL',
			'revisionFile' => 'clienscript.rev',
			'coreScriptPosition' => CClientScript::POS_END, // At will. Required Yii >= 1.1.11
			'defaultScriptFilePosition' => CClientScript::POS_END // At will. Required Yii >= 1.1.11
		),
	)
```

API
---

[](#api)

### YiiCSOL::registerScriptInit($module = null, $controller = null, $action = null, $position=self::POS\_READY, $data = array())

[](#yiicsolregisterscriptinitmodule--null-controller--null-action--null-positionselfpos_ready-data--array)

```
Yii::app()->clientScript->registerScriptInit();
```

### YiiCSOL::registerScriptData($name, $data)

[](#yiicsolregisterscriptdataname-data)

```
Yii::app()->clientScript->registerScriptData();
```

### YiiCSOL::registerCssFile($url, $media='')

[](#yiicsolregistercssfileurl-media)

```
Yii::app()->clientScript->registerCssFile();
```

### YiiCSOL::registerScriptFile($url, $position = null, $isRevision = true)

[](#yiicsolregisterscriptfileurl-position--null-isrevision--true)

```
Yii::app()->clientScript->registerScriptFile();
```

### YiiCSOL::getRevision()

[](#yiicsolgetrevision)

```
Yii::app()->clientScript->getRevision();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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/7c36b15f01dce750c54e099464af6a6eed321e982c67eb38ca4b6691032fae94?d=identicon)[yapendalff](/maintainers/yapendalff)

---

Top Contributors

[![smaknsk](https://avatars.githubusercontent.com/u/540191?v=4)](https://github.com/smaknsk "smaknsk (25 commits)")[![pendalff](https://avatars.githubusercontent.com/u/236587?v=4)](https://github.com/pendalff "pendalff (5 commits)")

### Embed Badge

![Health badge](/badges/pendalff-yii-csol/health.svg)

```
[![Health](https://phpackages.com/badges/pendalff-yii-csol/health.svg)](https://phpackages.com/packages/pendalff-yii-csol)
```

PHPackages © 2026

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