$s .= '/';
$s .= strtolower( $folder );
}
+ if ($s=='basesession'){
+ //print_r( debug_backtrace(false));
+ debug_print_backtrace();
+ die ('zzz');
+ }
require_once($s.'.php');
}
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseAdminLog extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('admin_log');
- $this->hasColumn('username', 'string', 32, array('type' => 'string', 'length' => '32'));
- $this->hasColumn('user_id', 'integer', null, array('type' => 'integer'));
- $this->hasColumn('object_id', 'integer', null, array('type' => 'integer'));
- $this->hasColumn('object_class', 'string', 200, array('type' => 'string', 'length' => '200'));
- $this->hasColumn('object_repr', 'string', 200, array('type' => 'string', 'length' => '200'));
- $this->hasColumn('action_flag', 'integer', null, array('type' => 'integer'));
- $this->hasColumn('change_message', 'string', 200, array('type' => 'string', 'length' => '200'));
-
-
- $this->index('idx_object_id', array('fields' => 'object_id'));
- $this->index('idx_object_class', array('fields' => 'object_class'));
- $this->index('idx_created_at', array('fields' => 'created_at'));
- $this->index('idx_action_flag', array('fields' => 'action_flag'));
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $timestampable0 = new IPF_ORM_Template_Timestampable(array('updated' => array('disabled' => true)));
- $this->actAs($timestampable0);
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseAdminLog extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('admin_log');\r
+ $this->hasColumn('username', 'string', 32, array('type' => 'string', 'length' => '32'));\r
+ $this->hasColumn('user_id', 'integer', null, array('type' => 'integer'));\r
+ $this->hasColumn('object_id', 'integer', null, array('type' => 'integer'));\r
+ $this->hasColumn('object_class', 'string', 200, array('type' => 'string', 'length' => '200'));\r
+ $this->hasColumn('object_repr', 'string', 200, array('type' => 'string', 'length' => '200'));\r
+ $this->hasColumn('action_flag', 'integer', null, array('type' => 'integer'));\r
+ $this->hasColumn('change_message', 'string', 200, array('type' => 'string', 'length' => '200'));\r
+\r
+\r
+ $this->index('idx_object_id', array('fields' => 'object_id'));\r
+ $this->index('idx_object_class', array('fields' => 'object_class'));\r
+ $this->index('idx_created_at', array('fields' => 'created_at'));\r
+ $this->index('idx_action_flag', array('fields' => 'action_flag'));\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $timestampable0 = new IPF_ORM_Template_Timestampable(array('updated' => array('disabled' => true)));\r
+ $this->actAs($timestampable0);\r
+ }\r
}
\ No newline at end of file
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BasePermission extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('auth_permission');
- $this->hasColumn('name', 'string', 255, array('unique' => true, 'type' => 'string', 'length' => '255'));
-
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $this->hasMany('User as Users', array('refClass' => 'UserPermission',
- 'local' => 'permission_id',
- 'foreign' => 'user_id'));
-
- $this->hasMany('RolePermission', array('local' => 'id',
- 'foreign' => 'permission_id'));
-
- $this->hasMany('UserPermission', array('local' => 'id',
- 'foreign' => 'permission_id'));
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BasePermission extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('auth_permission');\r
+ $this->hasColumn('name', 'string', 255, array('unique' => true, 'type' => 'string', 'length' => '255'));\r
+\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $this->hasMany('User as Users', array('refClass' => 'UserPermission',\r
+ 'local' => 'permission_id',\r
+ 'foreign' => 'user_id'));\r
+\r
+ $this->hasMany('RolePermission', array('local' => 'id',\r
+ 'foreign' => 'permission_id'));\r
+\r
+ $this->hasMany('UserPermission', array('local' => 'id',\r
+ 'foreign' => 'permission_id'));\r
+ }\r
}
\ No newline at end of file
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseRole extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('auth_role');
- $this->hasColumn('name', 'string', 255, array('unique' => true, 'type' => 'string', 'length' => '255'));
-
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $this->hasMany('User as Users', array('refClass' => 'UserRole',
- 'local' => 'role_id',
- 'foreign' => 'user_id'));
-
- $this->hasMany('RolePermission', array('local' => 'id',
- 'foreign' => 'role_id'));
-
- $this->hasMany('UserRole', array('local' => 'id',
- 'foreign' => 'role_id'));
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseRole extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('auth_role');\r
+ $this->hasColumn('name', 'string', 255, array('unique' => true, 'type' => 'string', 'length' => '255'));\r
+\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $this->hasMany('User as Users', array('refClass' => 'UserRole',\r
+ 'local' => 'role_id',\r
+ 'foreign' => 'user_id'));\r
+\r
+ $this->hasMany('RolePermission', array('local' => 'id',\r
+ 'foreign' => 'role_id'));\r
+\r
+ $this->hasMany('UserRole', array('local' => 'id',\r
+ 'foreign' => 'role_id'));\r
+ }\r
}
\ No newline at end of file
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseRolePermission extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('auth_role_permission');
- $this->hasColumn('role_id', 'integer', null, array('type' => 'integer', 'primary' => true));
- $this->hasColumn('permission_id', 'integer', null, array('type' => 'integer', 'primary' => true));
-
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $this->hasOne('Role', array('local' => 'role_id',
- 'foreign' => 'id'));
-
- $this->hasOne('Permission', array('local' => 'permission_id',
- 'foreign' => 'id'));
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseRolePermission extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('auth_role_permission');\r
+ $this->hasColumn('role_id', 'integer', null, array('type' => 'integer', 'primary' => true));\r
+ $this->hasColumn('permission_id', 'integer', null, array('type' => 'integer', 'primary' => true));\r
+\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $this->hasOne('Role', array('local' => 'role_id',\r
+ 'foreign' => 'id'));\r
+\r
+ $this->hasOne('Permission', array('local' => 'permission_id',\r
+ 'foreign' => 'id'));\r
+ }\r
}
\ No newline at end of file
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseUser extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('auth_user');
- $this->hasColumn('username', 'string', 32, array('type' => 'string', 'notblank' => true, 'notnull' => true, 'unique' => true, 'length' => '32'));
- $this->hasColumn('password', 'string', 128, array('type' => 'string', 'notblank' => true, 'notnull' => true, 'length' => '128'));
- $this->hasColumn('first_name', 'string', 32, array('type' => 'string', 'length' => '32'));
- $this->hasColumn('last_name', 'string', 32, array('type' => 'string', 'length' => '32'));
- $this->hasColumn('email', 'string', 200, array('type' => 'string', 'email' => true, 'notnull' => true, 'notblank' => true, 'unique' => true, 'length' => '200'));
- $this->hasColumn('is_staff', 'boolean', null, array('type' => 'boolean', 'notnull' => true, 'default' => false));
- $this->hasColumn('is_active', 'boolean', null, array('type' => 'boolean', 'notnull' => true, 'default' => false));
- $this->hasColumn('is_superuser', 'boolean', null, array('type' => 'boolean', 'notnull' => true, 'default' => false));
- $this->hasColumn('last_login', 'timestamp', null, array('type' => 'timestamp'));
-
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $this->hasMany('Role as Roles', array('refClass' => 'UserRole',
- 'local' => 'user_id',
- 'foreign' => 'role_id'));
-
- $this->hasMany('Permission as Permissions', array('refClass' => 'UserPermission',
- 'local' => 'user_id',
- 'foreign' => 'permission_id'));
-
- $this->hasMany('UserRole', array('local' => 'id',
- 'foreign' => 'user_id'));
-
- $this->hasMany('UserPermission', array('local' => 'id',
- 'foreign' => 'user_id'));
-
- $timestampable0 = new IPF_ORM_Template_Timestampable();
- $this->actAs($timestampable0);
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseUser extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('auth_user');\r
+ $this->hasColumn('username', 'string', 32, array('type' => 'string', 'notblank' => true, 'notnull' => true, 'unique' => true, 'length' => '32'));\r
+ $this->hasColumn('password', 'string', 128, array('type' => 'string', 'notblank' => true, 'notnull' => true, 'length' => '128'));\r
+ $this->hasColumn('first_name', 'string', 32, array('type' => 'string', 'length' => '32'));\r
+ $this->hasColumn('last_name', 'string', 32, array('type' => 'string', 'length' => '32'));\r
+ $this->hasColumn('email', 'string', 200, array('type' => 'string', 'email' => true, 'notnull' => true, 'notblank' => true, 'unique' => true, 'length' => '200'));\r
+ $this->hasColumn('is_staff', 'boolean', null, array('type' => 'boolean', 'notnull' => true, 'default' => false));\r
+ $this->hasColumn('is_active', 'boolean', null, array('type' => 'boolean', 'notnull' => true, 'default' => false));\r
+ $this->hasColumn('is_superuser', 'boolean', null, array('type' => 'boolean', 'notnull' => true, 'default' => false));\r
+ $this->hasColumn('last_login', 'timestamp', null, array('type' => 'timestamp'));\r
+\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $this->hasMany('Role as Roles', array('refClass' => 'UserRole',\r
+ 'local' => 'user_id',\r
+ 'foreign' => 'role_id'));\r
+\r
+ $this->hasMany('Permission as Permissions', array('refClass' => 'UserPermission',\r
+ 'local' => 'user_id',\r
+ 'foreign' => 'permission_id'));\r
+\r
+ $this->hasMany('UserRole', array('local' => 'id',\r
+ 'foreign' => 'user_id'));\r
+\r
+ $this->hasMany('UserPermission', array('local' => 'id',\r
+ 'foreign' => 'user_id'));\r
+\r
+ $timestampable0 = new IPF_ORM_Template_Timestampable();\r
+ $this->actAs($timestampable0);\r
+ }\r
}
\ No newline at end of file
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseUserPermission extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('auth_user_permission');
- $this->hasColumn('user_id', 'integer', null, array('type' => 'integer', 'primary' => true));
- $this->hasColumn('permission_id', 'integer', null, array('type' => 'integer', 'primary' => true));
-
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $this->hasOne('User', array('local' => 'user_id',
- 'foreign' => 'id'));
-
- $this->hasOne('Permission', array('local' => 'permission_id',
- 'foreign' => 'id'));
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseUserPermission extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('auth_user_permission');\r
+ $this->hasColumn('user_id', 'integer', null, array('type' => 'integer', 'primary' => true));\r
+ $this->hasColumn('permission_id', 'integer', null, array('type' => 'integer', 'primary' => true));\r
+\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $this->hasOne('User', array('local' => 'user_id',\r
+ 'foreign' => 'id'));\r
+\r
+ $this->hasOne('Permission', array('local' => 'permission_id',\r
+ 'foreign' => 'id'));\r
+ }\r
}
\ No newline at end of file
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseUserRole extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('auth_user_role');
- $this->hasColumn('user_id', 'integer', null, array('type' => 'integer', 'primary' => true));
- $this->hasColumn('role_id', 'integer', null, array('type' => 'integer', 'primary' => true));
-
- $this->option('type', 'INNODB');
- $this->option('collate', 'utf8_unicode_ci');
- $this->option('charset', 'utf8');
- }
-
- public function setUp()
- {
- $this->hasOne('User', array('local' => 'user_id',
- 'foreign' => 'id'));
-
- $this->hasOne('Role', array('local' => 'role_id',
- 'foreign' => 'id'));
- }
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseUserRole extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('auth_user_role');\r
+ $this->hasColumn('user_id', 'integer', null, array('type' => 'integer', 'primary' => true));\r
+ $this->hasColumn('role_id', 'integer', null, array('type' => 'integer', 'primary' => true));\r
+\r
+ $this->option('type', 'INNODB');\r
+ $this->option('collate', 'utf8_unicode_ci');\r
+ $this->option('charset', 'utf8');\r
+ }\r
+\r
+ public function setUp()\r
+ {\r
+ $this->hasOne('User', array('local' => 'user_id',\r
+ 'foreign' => 'id'));\r
+\r
+ $this->hasOne('Role', array('local' => 'role_id',\r
+ 'foreign' => 'id'));\r
+ }\r
}
\ No newline at end of file
public static function loadModels($directory, $modelLoading = null)
{
- $manager = IPF_ORM_Manager::getInstance();
-
- $modelLoading = $modelLoading === null ? $manager->getAttribute(IPF_ORM::ATTR_MODEL_LOADING):$modelLoading;
$loadedModels = array();
- if ($directory !== null) {
- foreach ((array) $directory as $dir) {
- if ( ! is_dir($dir)) {
- throw new IPF_ORM_Exception('You must pass a valid path to a directory containing IPF_ORM models');
- }
- $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::LEAVES_ONLY);
- foreach ($it as $file) {
- $e = explode('.', $file->getFileName());
- if (end($e) === 'php' && strpos($file->getFileName(), '.inc') === false) {
- $className = $e[0];
- if ($modelLoading == IPF_ORM::MODEL_LOADING_CONSERVATIVE) {
- self::loadModel($className, $file->getPathName());
- $loadedModels[$className] = $className;
- } else {
- //$declaredBefore = get_declared_classes();
- require_once($file->getPathName());
- $loadedModels[$className] = $className; // !!!
- /*
- //$declaredAfter = get_declared_classes();
- //$foundClasses = array_slice($declaredAfter, count($declaredBefore) - 1);
- if ($foundClasses) {
- foreach ($foundClasses as $className) {
- if (self::isValidModelClass($className)) {
- $loadedModels[$className] = $className;
-
- self::loadModel($className, $file->getPathName());
- }
- }
- }
- */
- }
- }
- }
+ $it = new DirectoryIterator($directory.DIRECTORY_SEPARATOR.'_generated');
+ foreach ($it as $file) {
+ $e = explode('.', $file->getFileName());
+ if (end($e) === 'php') {
+ $className = $e[0];
+ require_once($file->getPathName());
+ }
+ }
+ $it = new DirectoryIterator($directory);
+ foreach ($it as $file) {
+ $e = explode('.', $file->getFileName());
+ if (end($e) === 'php') {
+ $className = $e[0];
+ require_once($file->getPathName());
+ $loadedModels[$className] = $className;
}
}
return $loadedModels;
-<?php
-
-/**
- * This class has been auto-generated by the IPF_ORM Framework
- */
-abstract class BaseSession extends IPF_ORM_Record
-{
- public function setTableDefinition()
- {
- $this->setTableName('session');
- $this->hasColumn('session_key', 'string', 40, array('primary' => true, 'type' => 'string', 'length' => '40'));
- $this->hasColumn('session_data', 'string', null, array('type' => 'string'));
- $this->hasColumn('expire_data', 'timestamp', null, array('type' => 'timestamp'));
- }
-
+<?php\r
+\r
+/**\r
+ * This class has been auto-generated by the IPF_ORM Framework\r
+ */\r
+abstract class BaseSession extends IPF_ORM_Record\r
+{\r
+ public function setTableDefinition()\r
+ {\r
+ $this->setTableName('session');\r
+ $this->hasColumn('session_key', 'string', 40, array('primary' => true, 'type' => 'string', 'length' => '40'));\r
+ $this->hasColumn('session_data', 'string', null, array('type' => 'string'));\r
+ $this->hasColumn('expire_data', 'timestamp', null, array('type' => 'timestamp'));\r
+ }\r
+\r
}
\ No newline at end of file