Showing 41-60 of 826 items.

How to nest DB transactions without actually nesting them.

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top. 0 comments

To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.

1 0
1
Viewed: 14 543 times
Version: 1.1
Category: How-tos

ePay Integration - Bulgarian Payment Provider

Created 13 years ago by yasen yasen, updated 13 years ago by yasen yasen. 2 comments

} ` V. The Order model would start with:

class Order extends CActiveRecord
{
	const STATUS_INITIATED = 1;
	const STATUS_CANCELED = 2;
	const STATUS_EXPIRED = 3;
	const STATUS_PAID = 4;
	public $statuses = array(
		self::STATUS_INITIATED => 'Initiated',
		self::STATUS_CANCELED => 'Canceled',
		self::STATUS_EXPIRED => 'Expired',
		self::STATUS_PAID => 'Paid',
	);
// more cod...
6 0
5
Viewed: 14 699 times
Version: 1.1
Category: Tutorials

Multilanguage Lorem Ipsum Text Generator

Created 13 years ago by yasen yasen, updated 13 years ago by yasen yasen. 2 comments

Taking futher the idea from Piotr Masełkowski - http://www.yiiframework.com/extension/elipsum/ here's how to generate multilanguage Lorem Ipsum text. This example uses English and Bulgarian sample paragraphs. Create a class in /protected/components/LoremIpsum.php. Wall of text incoming wohoo...

2 0
1
Viewed: 14 748 times
Version: 1.1
Category: How-tos

How to preload dropdowns in CForm

Created 13 years ago by transistor transistor, updated 13 years ago by transistor transistor. 0 comments

So you want to use CForm (form builder), but need to preload dropdowns in a form? It's simpler than it seems.
You got your CFormModel, CForm and the actual Form, right?
Let's say you have the typical State -> City dependent dropdowns, so you would want to load the from with the State and City selected.

1 0
2
Viewed: 15 001 times
Version: Unknown (update)
Category: Tips

XSS safe model content

Created 16 years ago by phiras phiras, updated 16 years ago by phiras phiras. 2 comments

In this post I am going to describe a solution to make your yii-based web application safe from illegal content injections.

4 0
1
Viewed: 15 076 times
Version: 1.1
Category: Tutorials