本文整理汇总了PHP中sfPropelBehavior::registerMethods方法的典型用法代码示例。如果您正苦于以下问题:PHP sfPropelBehavior::registerMethods方法的具体用法?PHP sfPropelBehavior::registerMethods怎么用?PHP sfPropelBehavior::registerMethods使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfPropelBehavior
的用法示例。
在下文中一共展示了sfPropelBehavior::registerMethods方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupModelOneTime
/**
* Initializes the model and Propel behaviors by adding all the appropriate hooks only once.
*/
protected function setupModelOneTime()
{
if (!$this->model_setup) {
sfPropelBehavior::registerHooks('search', array(':save:pre' => array('sfSolrPropelBehavior', 'preSave'), ':save:post' => array('sfSolrPropelBehavior', 'postSave'), ':delete:pre' => array('sfSolrPropelBehavior', 'preDelete'), ':delete:post' => array('sfSolrPropelBehavior', 'postDelete')));
sfPropelBehavior::registerMethods('search', array(array('sfSolrPropelBehavior', 'saveIndex'), array('sfSolrPropelBehavior', 'deleteIndex'), array('sfSolrPropelBehavior', 'insertIndex')));
$this->model_setup = true;
}
}
示例2: array
<?php
/*
* This file is part of the sfPropelActAsCommentableBehavior package.
*
* (c) 2007 Xavier Lacot <xavier@lacot.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (in_array('sfComment', sfConfig::get('sf_enabled_modules', array()))) {
$r = sfRouting::getInstance();
$r->prependRoute('sf_comment_authenticated', '/sfComment/authenticated_comment', array('module' => 'sfComment', 'action' => 'authenticatedComment'));
$r->prependRoute('sf_comment_anonymous', '/sfComment/anonymous_comment', array('module' => 'sfComment', 'action' => 'anonymousComment'));
}
sfPropelBehavior::registerMethods('sfPropelActAsCommentableBehavior', array(array('sfPropelActAsCommentableBehavior', 'addComment'), array('sfPropelActAsCommentableBehavior', 'clearComments'), array('sfPropelActAsCommentableBehavior', 'getComments'), array('sfPropelActAsCommentableBehavior', 'getNbComments'), array('sfPropelActAsCommentableBehavior', 'removeComment')));
示例3: array
<?php
/*
* This file is part of the sfPropelActAsStarredBehavior package.
*
* (c) 2007 Gerald Estadieu <gestadieu@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('sfPropelActAsStarredBehavior', array(':delete:pre' => array('sfPropelActAsStarredBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('sfPropelActAsStarredBehavior', array(array('sfPropelActAsStarredBehavior', 'setStar'), array('sfPropelActAsStarredBehavior', 'countStars'), array('sfPropelActAsStarredBehavior', 'isStarred'), array('sfPropelActAsStarredBehavior', 'clearStar')));
示例4: array
<?php
/*
* This file is part of the sfPropelVersionableBehaviorPlugin package.
*
* (c) 2007 Tristan Rivoallan <tristan@rivoallan.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('versionable', array(':save:pre' => array('sfPropelVersionableBehavior', 'preSave'), ':save:post' => array('sfPropelVersionableBehavior', 'postSave'), ':delete:post' => array('sfPropelVersionableBehavior', 'postDelete')));
sfPropelBehavior::registerMethods('versionable', array(array('sfPropelVersionableBehavior', 'toVersion'), array('sfPropelVersionableBehavior', 'getAllVersions'), array('sfPropelVersionableBehavior', 'getAllResourceVersions'), array('sfPropelVersionableBehavior', 'getLastResourceVersion'), array('sfPropelVersionableBehavior', 'getCurrentResourceVersion'), array('sfPropelVersionableBehavior', 'setVersion'), array('sfPropelVersionableBehavior', 'getVersion'), array('sfPropelVersionableBehavior', 'setVersionComment'), array('sfPropelVersionableBehavior', 'getVersionComment'), array('sfPropelVersionableBehavior', 'setVersionCreatedBy'), array('sfPropelVersionableBehavior', 'getVersionCreatedBy'), array('sfPropelVersionableBehavior', 'getVersionCreatedAt'), array('sfPropelVersionableBehavior', 'addVersion')));
示例5: registerBehavior
/**
* Register empty 'changelog' behaviors to avoid error message
*/
protected function registerBehavior()
{
sfPropelBehavior::registerMethods('changelog', array());
sfPropelBehavior::registerHooks('changelog', array());
}
示例6: array
<?php
/*
* This file is part of the sfPropelActAsCountableBehavior package.
*
* (c) 2008 Xavier Lacot <xavier@lacot.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (in_array('sfCounter', sfConfig::get('sf_enabled_modules', array()))) {
$r = sfRouting::getInstance();
$r->prependRoute('sf_counter', '/sfCounter/increment/*', array('module' => 'sfCounter', 'action' => 'incrementCounter'));
}
sfPropelBehavior::registerHooks('sfPropelActAsCountableBehavior', array(':delete:post' => array('sfPropelActAsCountableBehavior', 'postDelete')));
sfPropelBehavior::registerMethods('sfPropelActAsCountableBehavior', array(array('sfPropelActAsCountableBehavior', 'decrementCounter'), array('sfPropelActAsCountableBehavior', 'forceCounter'), array('sfPropelActAsCountableBehavior', 'getCounter'), array('sfPropelActAsCountableBehavior', 'incrementCounter'), array('sfPropelActAsCountableBehavior', 'resetCounter'), array('sfPropelActAsCountableBehavior', 'saveCounter')));
示例7: array
<?php
/*
* This file is part of the sfPropelActAsNestedSetBehavior package.
*
* (c) 2007 Tristan Rivoallan <tristan@rivoallan.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('actasnestedset', array(':save:pre' => array('sfPropelActAsNestedSetBehavior', 'preSave'), ':delete:pre' => array('sfPropelActAsNestedSetBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('actasnestedset', array(array('sfPropelActAsNestedSetBehavior', 'getLeftValue'), array('sfPropelActAsNestedSetBehavior', 'getRightValue'), array('sfPropelActAsNestedSetBehavior', 'getParentIdValue'), array('sfPropelActAsNestedSetBehavior', 'getScopeIdValue'), array('sfPropelActAsNestedSetBehavior', 'setLeftValue'), array('sfPropelActAsNestedSetBehavior', 'setRightValue'), array('sfPropelActAsNestedSetBehavior', 'setParentIdValue'), array('sfPropelActAsNestedSetBehavior', 'setScopeIdValue'), array('sfPropelActAsNestedSetBehavior', 'makeRoot'), array('sfPropelActAsNestedSetBehavior', 'insertAsFirstChildOf'), array('sfPropelActAsNestedSetBehavior', 'insertAsLastChildOf'), array('sfPropelActAsNestedSetBehavior', 'insertAsNextSiblingOf'), array('sfPropelActAsNestedSetBehavior', 'insertAsPrevSiblingOf'), array('sfPropelActAsNestedSetBehavior', 'insertAsParentOf'), array('sfPropelActAsNestedSetBehavior', 'hasChildren'), array('sfPropelActAsNestedSetBehavior', 'getChildren'), array('sfPropelActAsNestedSetBehavior', 'getParent'), array('sfPropelActAsNestedSetBehavior', 'getNumberOfChildren'), array('sfPropelActAsNestedSetBehavior', 'getDescendants'), array('sfPropelActAsNestedSetBehavior', 'getNumberOfDescendants'), array('sfPropelActAsNestedSetBehavior', 'isRoot'), array('sfPropelActAsNestedSetBehavior', 'hasParent'), array('sfPropelActAsNestedSetBehavior', 'hasNextSibling'), array('sfPropelActAsNestedSetBehavior', 'hasPrevSibling'), array('sfPropelActAsNestedSetBehavior', 'isLeaf'), array('sfPropelActAsNestedSetBehavior', 'isEqualTo'), array('sfPropelActAsNestedSetBehavior', 'isChildOf'), array('sfPropelActAsNestedSetBehavior', 'isDescendantOf'), array('sfPropelActAsNestedSetBehavior', 'moveToFirstChildOf'), array('sfPropelActAsNestedSetBehavior', 'moveToLastChildOf'), array('sfPropelActAsNestedSetBehavior', 'moveToNextSiblingOf'), array('sfPropelActAsNestedSetBehavior', 'moveToPrevSiblingOf'), array('sfPropelActAsNestedSetBehavior', 'deleteChildren'), array('sfPropelActAsNestedSetBehavior', 'deleteDescendants'), array('sfPropelActAsNestedSetBehavior', 'retrieveFirstChild'), array('sfPropelActAsNestedSetBehavior', 'retrieveLastChild'), array('sfPropelActAsNestedSetBehavior', 'retrieveNextSibling'), array('sfPropelActAsNestedSetBehavior', 'retrievePrevSibling'), array('sfPropelActAsNestedSetBehavior', 'retrieveParent'), array('sfPropelActAsNestedSetBehavior', 'retrieveSiblings'), array('sfPropelActAsNestedSetBehavior', 'getLevel'), array('sfPropelActAsNestedSetBehavior', 'setLevel'), array('sfPropelActAsNestedSetBehavior', 'getPath'), array('sfPropelActAsNestedSetBehavior', 'reload')));
示例8: __construct
/**
* Singleton constructor.
* Initializes the model and Propel behaviors by adding all the appropriate hooks only once.
*/
protected function __construct()
{
sfPropelBehavior::registerHooks('search', array(':save:pre' => array('sfLucenePropelBehavior', 'preSave'), ':save:post' => array('sfLucenePropelBehavior', 'postSave'), ':delete:pre' => array('sfLucenePropelBehavior', 'preDelete'), ':delete:post' => array('sfLucenePropelBehavior', 'postDelete')));
sfPropelBehavior::registerMethods('search', array(array('sfLucenePropelBehavior', 'saveIndex'), array('sfLucenePropelBehavior', 'deleteIndex'), array('sfLucenePropelBehavior', 'insertIndex')));
}
示例9: array
<?php
/*
* This file is part of the sfPropelActAsTaggableBehavior package.
*
* (c) 2007 Xavier Lacot <xavier@lacot.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('sfPropelActAsTaggableBehavior', array(':save:post' => array('sfPropelActAsTaggableBehavior', 'postSave')));
sfPropelBehavior::registerMethods('sfPropelActAsTaggableBehavior', array(array('sfPropelActAsTaggableBehavior', 'addTag'), array('sfPropelActAsTaggableBehavior', 'getTags'), array('sfPropelActAsTaggableBehavior', 'hasTag'), array('sfPropelActAsTaggableBehavior', 'removeAllTags'), array('sfPropelActAsTaggableBehavior', 'removeTag'), array('sfPropelActAsTaggableBehavior', 'replaceTag'), array('sfPropelActAsTaggableBehavior', 'setTags')));
示例10: array
<?php
sfPropelBehavior::registerHooks('sfPropelApprovableBehavior', array(':save:post' => array('sfPropelApprovableBehavior', 'postSave'), 'Peer:doSelectRS' => array('sfPropelApprovableBehavior', 'doSelectRS')));
sfPropelBehavior::registerMethods('sfPropelApprovableBehavior', array(array('sfPropelApprovableBehavior', 'getApproval'), array('sfPropelApprovableBehavior', 'getApprovalUrl')));
示例11: array
<?php
/*
* This file is part of the sfPropelActAsRecommendableBehavior package.
*
* (c) 2007 Rémi Cieplicki <rcieplicki@clever-age.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
// @ TODO: Verifier
sfPropelBehavior::registerMethods('sfPropelActAsRecommendableBehavior', array(array('sfPropelActAsRecommendableBehavior', 'recommend'), array('sfPropelActAsRecommendableBehavior', 'userRecommendationExists'), array('sfPropelActAsRecommendableBehavior', 'getRecommendationScore')));
示例12: array
<?php
/*
* This file is part of the deppPropelActAsTaggableBehavior package.
*
* (c) 2007 Guglielmo Celata <guglielmo.celata@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('deppPropelActAsTaggableBehavior', array(':save:post' => array('deppPropelActAsTaggableBehavior', 'postSave'), ':delete:pre' => array('deppPropelActAsTaggableBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('deppPropelActAsTaggableBehavior', array(array('deppPropelActAsTaggableBehavior', 'addTag'), array('deppPropelActAsTaggableBehavior', 'getTags'), array('deppPropelActAsTaggableBehavior', 'getUserTags'), array('deppPropelActAsTaggableBehavior', 'hasTag'), array('deppPropelActAsTaggableBehavior', 'removeAllTags'), array('deppPropelActAsTaggableBehavior', 'removeTag'), array('deppPropelActAsTaggableBehavior', 'replaceTag'), array('deppPropelActAsTaggableBehavior', 'setTags'), array('deppPropelActAsTaggableBehavior', 'getTagsAsObjects'), array('deppPropelActAsTaggableBehavior', 'getTagsAsTaggingObjects')));
示例13: array
<?php
/*
* This file is part of the sfPropelActAsRatableBehavior package.
*
* (c) 2007 Nicolas Perriault <nperriault@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('sfPropelActAsRatableBehavior', array(':delete:pre' => array('sfPropelActAsRatableBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('sfPropelActAsRatableBehavior', array(array('sfPropelActAsRatableBehavior', 'countRatings'), array('sfPropelActAsRatableBehavior', 'setRating'), array('sfPropelActAsRatableBehavior', 'getMaxRating'), array('sfPropelActAsRatableBehavior', 'getRating'), array('sfPropelActAsRatableBehavior', 'getRatingDetails'), array('sfPropelActAsRatableBehavior', 'getReferenceKey'), array('sfPropelActAsRatableBehavior', 'getUserRating'), array('sfPropelActAsRatableBehavior', 'hasBeenRated'), array('sfPropelActAsRatableBehavior', 'hasBeenRatedByUser'), array('sfPropelActAsRatableBehavior', 'clearRatings'), array('sfPropelActAsRatableBehavior', 'clearUserRating')));
示例14: array
*
* (c) 2008 Guglielmo Celata <guglielmo.celata@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* hooks and methods for the actAsMonitorable behavior
*
**/
sfPropelBehavior::registerHooks('deppPropelActAsMonitorableBehavior', array(':delete:pre' => array('deppPropelActAsMonitorableBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('deppPropelActAsMonitorableBehavior', array(array('deppPropelActAsMonitorableBehavior', 'addMonitoringUser'), array('deppPropelActAsMonitorableBehavior', 'removeMonitoringUser'), array('deppPropelActAsMonitorableBehavior', 'isMonitoredByUser'), array('deppPropelActAsMonitorableBehavior', 'getMonitoringUsersPKs'), array('deppPropelActAsMonitorableBehavior', 'getMonitoringUsers'), array('deppPropelActAsMonitorableBehavior', 'countMonitoringUsers'), array('deppPropelActAsMonitorableBehavior', 'getNNewNews'), array('deppPropelActAsMonitorableBehavior', 'getLastNews')));
/**
* hooks and methods for the actAsMonitorer behavior
*
**/
sfPropelBehavior::registerHooks('deppPropelActAsMonitorerBehavior', array(':delete:pre' => array('deppPropelActAsMonitorerBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('deppPropelActAsMonitorerBehavior', array(array('deppPropelActAsMonitorerBehavior', 'addMonitoredObject'), array('deppPropelActAsMonitorerBehavior', 'removeMonitoredObject'), array('deppPropelActAsMonitorerBehavior', 'removeAllMonitoredObjects'), array('deppPropelActAsMonitorerBehavior', 'getMonitoredPks'), array('deppPropelActAsMonitorerBehavior', 'getMonitoredObjects'), array('deppPropelActAsMonitorerBehavior', 'countMonitoredObjects'), array('deppPropelActAsMonitorerBehavior', 'isMonitoring')));
/**
* hooks and methods for the actAsNewsGenerator behavior
*
**/
sfPropelBehavior::registerHooks('deppPropelActAsNewsGeneratorBehavior', array(':delete:pre' => array('deppPropelActAsNewsGeneratorBehavior', 'preDelete'), ':save:pre' => array('deppPropelActAsNewsGeneratorBehavior', 'preSave'), ':save:post' => array('deppPropelActAsNewsGeneratorBehavior', 'postSave')));
sfPropelBehavior::registerMethods('deppPropelActAsNewsGeneratorBehavior', array(array('deppPropelActAsNewsGeneratorBehavior', 'generateNews'), array('deppPropelActAsNewsGeneratorBehavior', 'getGeneratedNews'), array('deppPropelActAsNewsGeneratorBehavior', 'getPrimaryKeysArray'), array('deppPropelActAsNewsGeneratorBehavior', 'getNewsDate'), array('deppPropelActAsNewsGeneratorBehavior', 'getNewsPriority'), array('deppPropelActAsNewsGeneratorBehavior', 'getRelatedMonitorableObjects'), array('deppPropelActAsNewsGeneratorBehavior', 'getRelatedMonitorableObject')));
/**
* hooks and methods for the actAsCommunityNewsGenerator behavior
*
**/
sfPropelBehavior::registerHooks('deppPropelActAsCommunityNewsGeneratorBehavior', array(':delete:pre' => array('deppPropelActAsCommunityNewsGeneratorBehavior', 'preDelete'), ':save:pre' => array('deppPropelActAsCommunityNewsGeneratorBehavior', 'preSave'), ':save:post' => array('deppPropelActAsCommunityNewsGeneratorBehavior', 'postSave')));
sfPropelBehavior::registerMethods('deppPropelActAsCommunityNewsGeneratorBehavior', array(array('deppPropelActAsCommunityNewsGeneratorBehavior', 'generateCreationCommunityNews'), array('deppPropelActAsCommunityNewsGeneratorBehavior', 'generateRemovalCommunityNews'), array('deppPropelActAsCommunityNewsGeneratorBehavior', 'getGeneratedNews'), array('deppPropelActAsCommunityNewsGeneratorBehavior', 'getPrimaryKeysArray'), array('deppPropelActAsCommunityNewsGeneratorBehavior', 'getRelatedObject')));
示例15: array
<?php
/*
* This file is part of the deppPropelActAsPrioritisableBehavior package.
*
* (c) 2010 Guglielmo Celata <guglielmo@openpolis.it>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
sfPropelBehavior::registerHooks('deppPropelActAsPrioritisableBehavior', array(':delete:pre' => array('deppPropelActAsPrioritisableBehavior', 'preDelete')));
sfPropelBehavior::registerMethods('deppPropelActAsPrioritisableBehavior', array(array('deppPropelActAsPrioritisableBehavior', 'setPriorityValue'), array('deppPropelActAsPrioritisableBehavior', 'getPriorityValue'), array('deppPropelActAsPrioritisableBehavior', 'getPriorityLastUser'), array('deppPropelActAsPrioritisableBehavior', 'getPriorityLastUpdate'), array('deppPropelActAsPrioritisableBehavior', 'hasBeenPrioritised'), array('deppPropelActAsPrioritisableBehavior', 'clearPriority'), array('deppPropelActAsPrioritisableBehavior', 'getMaxPriority'), array('deppPropelActAsPrioritisableBehavior', 'allowsNullPriority'), array('deppPropelActAsPrioritisableBehavior', 'getPrioritisableReferenceKey')));