PHPackages                             smak/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. [Framework](/categories/framework)
4. /
5. smak/yii-csol

AbandonedArchivedYii-extension[Framework](/categories/framework)

smak/yii-csol
=============

Implement Object Literal methods for client script Yii

1.0.1(9y ago)01981[2 issues](https://github.com/smaknsk/yii-csol/issues)GPLPHP

Since Feb 20Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)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)

Composer

```
composer require smak/yii-csol
```

Add to protected/config/main.php

```
	'components' => array(
		...
		'clientScript' => array(
			'class' => 'ext.yii-csol.YiiCSOL',
			'revisionFile' => 'clienscript.rev',
			'coreScriptPosition' => CClientScript::POS_END, // Optional. Required Yii >= 1.1.11
			'defaultScriptFilePosition' => CClientScript::POS_END // Optional. 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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 86.1% 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.

###  Release Activity

Cadence

Every ~517 days

Total

2

Last Release

3586d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/deb4876a15dffb5e9ac3a83076b6623ff69119d3027a2ca838930768ce3e0a79?d=identicon)[Smak](/maintainers/Smak)

---

Top Contributors

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

---

Tags

yiiclientscript

### Embed Badge

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

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

###  Alternatives

[yiisoft/yii

Yii Web Programming Framework

4.8k5.6M262](/packages/yiisoft-yii)[yiisoft/yii2-queue

Yii2 Queue Extension which supports queues based on DB, Redis, RabbitMQ, Beanstalk, SQS, and Gearman

1.1k10.4M155](/packages/yiisoft-yii2-queue)[omnilight/yii2-scheduling

Scheduling extension for Yii2 framework

3181.0M7](/packages/omnilight-yii2-scheduling)[yiisoft/yii2-coding-standards

Yii PHP Framework Version 2 - Coding standard tools

1831.0M165](/packages/yiisoft-yii2-coding-standards)[yiisoft/db

Database abstraction layer and query builder

187468.4k30](/packages/yiisoft-db)[yiisoft/arrays

Yii Array Helper

562.0M56](/packages/yiisoft-arrays)

PHPackages © 2026

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