Common
[ class tree: Common ] [ index: Common ] [ all elements ]

Class: Common_Model_DbTable_Category

Source Location: /application/modules/common/models/DbTable/Category.php

Class Overview

Zend_Db_Table_Abstract
   |
   --Setuco_Db_Table_Abstract
      |
      --Common_Model_DbTable_Category



Author(s):

  • charlesvineyard suzuki-mar

Variables

Constants

Methods


Inherited Constants

Inherited Methods

Class: Setuco_Db_Table_Abstract

Setuco_Db_Table_Abstract::countAll()
全部で何件あるのか取得する
Setuco_Db_Table_Abstract::deleteByPrimary()
指定されたIDのレコードを削除します。
Setuco_Db_Table_Abstract::escapeLikeString()
WHERE句のLIKE演算子や正規表現に与える文字列を\(バックスラッシュ)でエスケープします。 エスケープされた文字が検索できるようになります。 バックスラッシュ自体を検索するときは、getBsReplacedExpressionとセットで使う必要があります。
Setuco_Db_Table_Abstract::getBsReplacedExpression()
$columnNameにSQL文のカラム名、リテラルを受け取り、MySQL,PostgreSQLのreplace関数を
Setuco_Db_Table_Abstract::loadByPrimary()
IDからひとつの行を取得し、配列で返します。 行が見つからなければ null を返します。
Setuco_Db_Table_Abstract::updateByPrimary()
指定されたIDのレコードを更新する。

Class Details

[line 24]


Tags:

author:  charlesvineyard suzuki-mar


[ Top ]


Class Variables

$_alias =  'c'

[line 46]

テーブルのalias名



Tags:

access:  protected

Type:   String


[ Top ]

$_name =  'category'

[line 32]

テーブル名



Tags:

access:  protected

Type:   String


[ Top ]

$_primary =  'id'

[line 39]

プライマリーキーのカラム名



Tags:

access:  protected

Type:   String


[ Top ]



Class Methods


method countAll [line 220]

int countAll( )

全ての有効なカテゴリーの件数を数えます。



Tags:

return:  全てのカテゴリー件数
author:  charlesvineyard
access:  public


Overrides Setuco_Db_Table_Abstract::countAll() (全部で何件あるのか取得する)

[ Top ]

method loadAllCategories [line 154]

array loadAllCategories( )

すべてのカテゴリーを取得する



Tags:

return:  すべてのカテゴリー。なにもなければ空の配列。
author:  suzuki-mar
access:  public


[ Top ]

method loadAllCategoriesSpecifiedColumns [line 191]

array loadAllCategoriesSpecifiedColumns( string|array $selectColumns, string $sortColumn, [string $order = 'ASC'])

指定したカラム・ソートでカテゴリー一覧を取得します。



Tags:

return:  カテゴリー情報の一覧
author:  charlesvineyard
access:  public


Parameters:

string|array   $selectColumns   取得するカラム
string   $sortColumn   並べ替えるカラム名
string   $order   並び順(asc or desc) デフォルトは asc

[ Top ]

method loadCategories4Pager [line 171]

array loadCategories4Pager( string $order, int $pageNumber, int $limit)

指定したソートでカテゴリー一覧を取得します。



Tags:

return:  カテゴリー情報の一覧
author:  suzuki-mar
access:  public


Parameters:

string   $order   カテゴリーを昇順か降順でソートするのか 文字列
int   $pageNumber   取得するページ番号
int   $limit   1ページあたり何件のデータを取得するのか

[ Top ]

method loadCategoriesByParentId [line 206]

array loadCategoriesByParentId( int $parentId, $sortColumn, [ $order = 'ASC'])

指定の親カテゴリIdを持つカテゴリーを取得します。



Tags:

return:  カテゴリー情報の一覧
author:  charlesvineyard
access:  public


Parameters:

int   $parentId   親カテゴリID
   $sortColumn  
   $order  

[ Top ]

method loadUsedCategories [line 113]

array loadUsedCategories( )

使用しているカテゴリーを取得する



Tags:

return:  使用されているカテゴリー一覧
author:  suzuki-mar
access:  public


[ Top ]

method _addParentIdWhere [line 95]

Zend_Db_Select _addParentIdWhere( &$select, string $operator, [ $alias = null], Zend_Select $select, stirng[option] $aliasName)

共通のwhere句の設定をする 未分類のカテゴリーを取得するwhere句をセットする オプションで取得しないにもできる 未分類のカテゴリーの処理が変わる可能性があるので



Tags:

return:  未分類のカテゴリーに関するwhereを設定してSelectオブジェクト
author:  suzuki-mar
access:  protected


Parameters:

Zend_Select   $select   where句をセットするSelectオブジェクト
string   $operator   where句の演算子
stirng[option]   $aliasName   エリアスに設定した名前 外部結合しない場合は引数を設定しない
Zend_Db_Select   &$select  
   $alias  

[ Top ]

method _initializeJoinSelect [line 75]

Zend_Db_Select _initializeJoinSelect( )

初期設定をする 外部結合をする設定



Tags:

return:  外部結合ようの初期設定をしたSELECTオブジェクト
access:  protected


[ Top ]

method _initializeSelect [line 61]

Zend_Db_Select _initializeSelect( )

共通の初期設定をしたSELECTオブジェクト



Tags:

return:  共通の初期設定をしたSELECTオブジェクト
author:  suzuki-mar
access:  protected


[ Top ]

method _joinPage [line 136]

void _joinPage( &$select, Zend_Db_Select $select)

外部テーブルと結合したものを取得する groupなどの必要な設定もしている



Tags:

author:  suzuki-mar
access:  protected


Parameters:

Zend_Db_Select   $select   結合するSELECTオブジェクト
Zend_Db_Select   &$select  

[ Top ]


Class Constants

PARENT_ROOT_ID =  -1

[line 53]

親が無いカテゴリーの仮想親ID


[ Top ]



Documentation generated on Mon, 07 Feb 2011 01:28:08 +0900 by phpDocumentor 1.4.3