When using CTimestampBehavior in the zii extension dir, do i need to copy it to the extension or components dir under protected?
i added this to my active record model
public function behaviors()
{
return array(
'CTimestampBehavior' => array(
'class' => 'CTimestampBehavior',
/*
'createAttribute' => 'create_time',
'updateAttribute' => 'update_time',
*/
)
);
}
but got the following error
PHP Error
Description
require(CTimestampBehavior.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory
Source File
C:\wamp\www\yii\framework\YiiBase.php(236)
00224:
00225: if(class_exists($alias,false) || interface_exists($alias,false))
00226: return self::$_imports[$alias]=$alias;
00227:
00228: if(isset(self::$_coreClasses[$alias]) || ($pos=strrpos($alias,'.'))===false) // a simple class name
00229: {
00230: self::$_imports[$alias]=$alias;
00231: if($forceInclude)
00232: {
00233: if(isset(self::$_coreClasses[$alias])) // a core class
00234: require(YII_PATH.self::$_coreClasses[$alias]);
00235: else
00236: require($alias.'.php');// error line
00237: }
00238: return $alias;
00239: }
00240:
00241: if(($className=(string)substr($alias,$pos+1))!=='*' && (class_exists($className,false) || interface_exists($className,false)))
00242: return self::$_imports[$alias]=$className;
00243:
00244: if(($path=self::getPathOfAlias($alias))!==false)
00245: {
00246: if($className!=='*')
00247: {
00248: self::$_imports[$alias]=$className;
Stack Trace
I know how to include files or whatever but is this suppose to happen if i simply add that method to my model?
this is in yii 1.1 alpha from the trunk