public function setClassName($className)
    {
        if ($this->_targetTable !== null &&
            get_class($this->_targetTable) !== App::className($className, 'Model/Table', 'Table')
        ) {
            throw new InvalidArgumentException(
                'The class name doesn\'t match the target table\'s class name.'
            );
        }

        $this->_className = $className;

        return $this;
    }
public function setClassName($className)
    {
        if ($this->_targetTable !== null &&
            get_class($this->_targetTable) !== App::className($className, 'Model/Table', 'Table')
        ) {
            throw new InvalidArgumentException(
                'The class name doesn\'t match the target table\'s class name.'
            );
        }

        $this->_className = $className;

        return $this;
    }
public function setClassName ( $ className ) { if ( $ this -> _targetTable !== null && get_class ( $ this -> _targetTable ) !== App :: className ( $ className , 'Model/Table' , 'Table' ) ) { throw new InvalidArgumentException ( 'The class name doesn\'t match the target table\'s class name.' ) ; } $ this -> _className = $ className ; return $ this ; }
Sets the class name of the target table object.

@param string $className Class name to set.
@return $this
@throws \InvalidArgumentException In case the class name is set after the target table has been
resolved, and it doesn't match the target table's class name.
Sets the class name of the target table object .