404 Not Found
とりあえずこちらが役に立ちました。ありがとうございます。
- initializeして
- 関数を書いて
- $this->controller->モデル名->メソッド
で良いと思います。
あと、loadModelは使えませんでした。
<?php class CheckComponent extends Object { //called before Controller::beforeFilter() function initialize(&$controller) { // saving the controller reference for later use $this->controller =& $controller; } //called after Controller::beforeFilter() function startup(&$controller) { } function redirectSomewhere($value) { // utilizing a controller method $this->controller->redirect($value); } } ?>
追記:基本的にコンポーネント内でモデルを使う事は推奨されていないので、
極力使わない方向でいく。