src/Database/Entity.php
public static function table($alias = null)
    {
        $className = get_called_class();
        $tableKey = $className . ($alias ? ':' . $alias : '');
        $table = &self::$tables[$tableKey];
        if (null !== $table) {
            return $table;
        }
        /*
        if (isset(self::$settingColumns[$tableKey])) {
            throw new Exception('Already setting columns');
        }
        $columns = new \stdClass();
        self::$settingColumns[$tableKey] = $columns;
        unset(self::$settingColumns[$tableKey]);
        */
        $schemaName = Utils::fromCamelCase(str_replace('\\', '', $className));
        $table = new Table(null, self::getDatabase($className), $schemaName);
        $table->entityClassName = $className;
        $table->alias = $alias;
        static::setUpColumns($table->columns);
        static::setUpTable($table, $table->columns);

        return $table;
    }
public static function table($alias = null)
    {
        $className = get_called_class();
        $tableKey = $className . ($alias ? ':' . $alias : '');
        $table = &self::$tables[$tableKey];
        if (null !== $table) {
            return $table;
        }
        /*
        if (isset(self::$settingColumns[$tableKey])) {
            throw new Exception('Already setting columns');
        }
        $columns = new \stdClass();
        self::$settingColumns[$tableKey] = $columns;
        unset(self::$settingColumns[$tableKey]);
        */
        $schemaName = Utils::fromCamelCase(str_replace('\\', '', $className));
        $table = new Table(null, self::getDatabase($className), $schemaName);
        $table->entityClassName = $className;
        $table->alias = $alias;
        static::setUpColumns($table->columns);
        static::setUpTable($table, $table->columns);

        return $table;
    }
public static function table ( $ alias = null ) { $ className = get_called_class ( ) ; $ tableKey = $ className . ( $ alias ? ':' . $ alias : '' ) ; $ table = & self :: $ tables [ $ tableKey ] ; if ( null !== $ table ) { return $ table ; } /*
        if (isset(self::$settingColumns[$tableKey])) {
            throw new Exception('Already setting columns');
        }
        $columns = new \stdClass();
        self::$settingColumns[$tableKey] = $columns;
        unset(self::$settingColumns[$tableKey]);
        */ $ schemaName = Utils :: fromCamelCase ( str_replace ( '\\' , '' , $ className ) ) ; $ table = new Table ( null , self :: getDatabase ( $ className ) , $ schemaName ) ; $ table -> entityClassName = $ className ; $ table -> alias = $ alias ; static :: setUpColumns ( $ table -> columns ) ; static :: setUpTable ( $ table , $ table -> columns ) ; return $ table ; }
Method should return table definition of entity
@return Table
Method should return table definition of entity