Commits

Arie W. Subagja committed 9f5874b

extendable

  • Participants
  • Parent commits 59137c6

Comments (0)

Files changed (8)

File classes/model/malam/phpbb3/config.php

+<?php
+
+defined('SYSPATH') or die('No direct script access.');
+
+/**
+ * @author  arie
+ */
+
+class Model_Malam_Phpbb3_Config extends ORM
+{
+    /**
+     * Database config group
+     * @var String
+     */
+    protected $_db_group        = 'phpbb3';
+
+    /**
+     * Constructs a new model and loads a record if given
+     *
+     * +mod: dynamyc $_db_group
+     *
+     * @param   mixed $id Parameter for find or object to load
+     * @return  void
+     */
+    public function __construct($id = NULL)
+    {
+        $this->_table_name  = CONFIG_TABLE;
+        parent::__construct($id);
+    }
+}

File classes/model/malam/phpbb3/group.php

+<?php
+
+defined('SYSPATH') or die('No direct script access.');
+
+/**
+ * @author  arie
+ */
+
+class Model_Malam_Phpbb3_Group extends ORM
+{
+    /**
+     * Database config group
+     * @var String
+     */
+    protected $_db_group        = 'phpbb3';
+
+    /**
+     * Table primary key
+     * @var string
+     */
+    protected $_primary_key     = 'group_id';
+
+    /**
+     * "Has many" relationships
+     * @var array
+     */
+    protected $_has_many        = array(
+        'users'            => array(
+            'model'         => 'phpbb3_user',
+            'through'       => 'user_group',
+            'foreign_key'   => 'group_id',
+        ),
+        'user_groups'       => array(
+            'model'         => 'phpbb3_user_group',
+            'foreign_key'   => 'group_id'
+        ),
+    );
+
+    /**
+     * Constructs a new model and loads a record if given
+     *
+     * +mod: dynamyc $_db_group
+     *
+     * @param   mixed $id Parameter for find or object to load
+     * @return  void
+     */
+    public function __construct($id = NULL)
+    {
+        $this->_table_name  = GROUPS_TABLE;
+        parent::__construct($id);
+    }
+}

File classes/model/malam/phpbb3/user.php

+<?php
+
+defined('SYSPATH') or die('No direct script access.');
+
+/**
+ * @author  arie
+ */
+
+class Model_Malam_Phpbb3_User extends ORM
+{
+    /**
+     * Database config group
+     * @var String
+     */
+    protected $_db_group        = 'phpbb3';
+
+    /**
+     * Table primary key
+     * @var string
+     */
+    protected $_primary_key     = 'user_id';
+
+    /**
+     * "Has many" relationships
+     * @var array
+     */
+    protected $_has_many        = array(
+        'groups'            => array(
+            'model'         => 'phpbb3_group',
+            'through'       => 'user_group',
+            'foreign_key'   => 'user_id',
+        ),
+        'user_groups'       => array(
+            'model'         => 'phpbb3_user_group',
+            'foreign_key'   => 'user_id'
+        ),
+    );
+
+    /**
+     * "Has one" relationships
+     * @var array
+     */
+    protected $_has_one         = array(
+        'user'              => array(
+            'model'         => 'user',
+            'foreign_key'   => 'bb_user_id'
+        ),
+    );
+
+    /**
+     * Constructs a new model and loads a record if given
+     *
+     * +mod: dynamyc $_db_group
+     *
+     * @param   mixed $id Parameter for find or object to load
+     * @return  void
+     */
+    public function __construct($id = NULL)
+    {
+        $this->_table_name  = USERS_TABLE;
+        parent::__construct($id);
+    }
+
+    /**
+     * Allows a model use both email and username as unique identifiers for login
+     *
+     * @param   string  unique value
+     * @return  string  field name
+     */
+    public function unique_key($value)
+    {
+        return Valid::email($value) ? 'user_email' : 'username_clean';
+    }
+}

File classes/model/malam/phpbb3/user/group.php

+<?php
+
+defined('SYSPATH') or die('No direct script access.');
+
+/**
+ * @author  arie
+ */
+
+class Model_Malam_Phpbb3_User_Group extends ORM
+{
+    /**
+     * Database config group
+     * @var String
+     */
+    protected $_db_group        = 'phpbb3';
+
+    /**
+     * "Belongs To" relationships
+     * @var array
+     */
+    protected $_belongs_to      = array(
+        'phpbb3_user'       => array(
+            'model'         => 'phpbb3_user',
+            'foreign_key'   => 'user_id',
+        ),
+        'phpbb3_group'      => array(
+            'model'         => 'phpbb3_user',
+            'foreign_key'   => 'group_id',
+        )
+    );
+
+    /**
+     * Constructs a new model and loads a record if given
+     *
+     * +mod: dynamyc $_db_group
+     *
+     * @param   mixed $id Parameter for find or object to load
+     * @return  void
+     */
+    public function __construct($id = NULL)
+    {
+        $this->_table_name  = USER_GROUP_TABLE;
+        parent::__construct($id);
+    }
+}

File classes/model/phpbb3/config.php

  * @author  arie
  */
 
-class Model_Phpbb3_Config extends ORM
-{
-    /**
-     * Database config group
-     * @var String
-     */
-    protected $_db_group        = 'phpbb3';
-
-    /**
-     * Constructs a new model and loads a record if given
-     *
-     * +mod: dynamyc $_db_group
-     *
-     * @param   mixed $id Parameter for find or object to load
-     * @return  void
-     */
-    public function __construct($id = NULL)
-    {
-        $this->_table_name  = CONFIG_TABLE;
-        parent::__construct($id);
-    }
-}
+class Model_Phpbb3_Config extends Model_Malam_Phpbb3_Config
+{}

File classes/model/phpbb3/group.php

  * @author  arie
  */
 
-class Model_Phpbb3_Group extends ORM
-{
-    /**
-     * Database config group
-     * @var String
-     */
-    protected $_db_group        = 'phpbb3';
-
-    /**
-     * Table primary key
-     * @var string
-     */
-    protected $_primary_key     = 'group_id';
-
-    /**
-     * "Has many" relationships
-     * @var array
-     */
-    protected $_has_many        = array(
-        'users'            => array(
-            'model'         => 'phpbb3_user',
-            'through'       => 'user_group',
-            'foreign_key'   => 'group_id',
-        ),
-        'user_groups'       => array(
-            'model'         => 'phpbb3_user_group',
-            'foreign_key'   => 'group_id'
-        ),
-    );
-
-    /**
-     * Constructs a new model and loads a record if given
-     *
-     * +mod: dynamyc $_db_group
-     *
-     * @param   mixed $id Parameter for find or object to load
-     * @return  void
-     */
-    public function __construct($id = NULL)
-    {
-        $this->_table_name  = GROUPS_TABLE;
-        parent::__construct($id);
-    }
-}
+class Model_Phpbb3_Group extends Model_Malam_Phpbb3_Group
+{}

File classes/model/phpbb3/user.php

  * @author  arie
  */
 
-class Model_Phpbb3_User extends ORM
-{
-    /**
-     * Database config group
-     * @var String
-     */
-    protected $_db_group        = 'phpbb3';
-
-    /**
-     * Table primary key
-     * @var string
-     */
-    protected $_primary_key     = 'user_id';
-
-    /**
-     * "Has many" relationships
-     * @var array
-     */
-    protected $_has_many        = array(
-        'groups'            => array(
-            'model'         => 'phpbb3_group',
-            'through'       => 'user_group',
-            'foreign_key'   => 'user_id',
-        ),
-        'user_groups'       => array(
-            'model'         => 'phpbb3_user_group',
-            'foreign_key'   => 'user_id'
-        ),
-    );
-
-    /**
-     * "Has one" relationships
-     * @var array
-     */
-    protected $_has_one         = array(
-        'user'              => array(
-            'model'         => 'user',
-            'foreign_key'   => 'bb_user_id'
-        ),
-    );
-
-    /**
-     * Constructs a new model and loads a record if given
-     *
-     * +mod: dynamyc $_db_group
-     *
-     * @param   mixed $id Parameter for find or object to load
-     * @return  void
-     */
-    public function __construct($id = NULL)
-    {
-        $this->_table_name  = USERS_TABLE;
-        parent::__construct($id);
-    }
-
-    /**
-     * Allows a model use both email and username as unique identifiers for login
-     *
-     * @param   string  unique value
-     * @return  string  field name
-     */
-    public function unique_key($value)
-    {
-        return Valid::email($value) ? 'user_email' : 'username_clean';
-    }
-}
+class Model_Phpbb3_User extends Model_Malam_Phpbb3_User
+{}

File classes/model/phpbb3/user/group.php

  * @author  arie
  */
 
-class Model_Phpbb3_User_Group extends ORM
-{
-    /**
-     * Database config group
-     * @var String
-     */
-    protected $_db_group        = 'phpbb3';
-
-    /**
-     * "Belongs To" relationships
-     * @var array
-     */
-    protected $_belongs_to      = array(
-        'phpbb3_user'       => array(
-            'model'         => 'phpbb3_user',
-            'foreign_key'   => 'user_id',
-        ),
-        'phpbb3_group'      => array(
-            'model'         => 'phpbb3_user',
-            'foreign_key'   => 'group_id',
-        )
-    );
-
-    /**
-     * Constructs a new model and loads a record if given
-     *
-     * +mod: dynamyc $_db_group
-     *
-     * @param   mixed $id Parameter for find or object to load
-     * @return  void
-     */
-    public function __construct($id = NULL)
-    {
-        $this->_table_name  = USER_GROUP_TABLE;
-        parent::__construct($id);
-    }
-}
+class Model_Phpbb3_User_Group extends Model_Malam_Phpbb3_User_Group
+{}