This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Flavor 1: | |
* By the time this was completed I realized I had created a monster. | |
* In interests of showing I'm capable of over-engineering things, however, | |
* I have included it. | |
*/ | |
for( $i = 1; $i <= 100; $i++ ) | |
{ | |
$ret = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ActiveRecord extends CActiveRecord | |
{ | |
/** | |
* Check if the current record already exists in the database. | |
* | |
* $exludeColumns array of attribute names; these columns/attribute names will be excluded from search. | |
* @return boolean | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ActiveRecord extends CActiveRecord | |
{ | |
/** | |
* Requires >= Yii 1.1.14; | |
* | |
* @recordAttributes is an array of key=>value pairs which can be inserted into @tableName | |
* @tableName is the table into which these values will be inserted. Will attempt to determine the name itself | |
* if left to its own devices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ActiveRecord extends CActiveRecord | |
{ | |
/** | |
* Based on ActiveRecord delete() but instead of actually deleting it sets an attribute to deleted=true. | |
* Others have chosen to implement this as a behavior; this should be standard AR practice, but in order | |
* to maintain backwards compatibility with a few models which use delete() to actually delete models it must not be overridden (delete). | |
* | |
* Performs a logical delete. |