src/Titon/Db/Repository.php
public function addBehavior(Behavior $behavior) {
        $behavior->setRepository($this);

        $this->_behaviors[$behavior->getAlias()] = $behavior;

        $this->attachObject($behavior->getAlias(), $behavior);

        if ($behavior instanceof Listener) {
            $this->on('db', $behavior);
        }

        return $this;
    }
public function addBehavior(Behavior $behavior) {
        $behavior->setRepository($this);

        $this->_behaviors[$behavior->getAlias()] = $behavior;

        $this->attachObject($behavior->getAlias(), $behavior);

        if ($behavior instanceof Listener) {
            $this->on('db', $behavior);
        }

        return $this;
    }
public function addBehavior ( Behavior $ behavior ) { $ behavior -> setRepository ( $ this ) ; $ this -> _behaviors [ $ behavior -> getAlias ( ) ] = $ behavior ; $ this -> attachObject ( $ behavior -> getAlias ( ) , $ behavior ) ; if ( $ behavior instanceof Listener ) { $ this -> on ( 'db' , $ behavior ) ; } return $ this ; }
Add a behavior.

@param \Titon\Db\Behavior $behavior
@return $this
Add a behavior .