Development

#1596 ([PATCH] sfPropelBehavior configuration validation)

You must first sign up to be able to contribute.

Ticket #1596 (new enhancement)

Opened 2 years ago

Last modified 3 weeks ago

[PATCH] sfPropelBehavior configuration validation

Reported by: trivoallan Assigned to: trivoallan
Priority: minor Milestone: 1.3.0
Component: other Version: 1.0.0
Keywords: Cc:
Qualification: Design decision

Description

it would be useful to give configuration validation capabilities to behavior developers.

When doing this :

<?php
  sfPropelBehavior::add('MyClass', array('MyBehavior' => array('some' => 'configuration')));

it would be handy if a validation method could be called (if existing). say :

<?php

class MyBehavior
{
  /**
   * @throws sfConfigurationException
   */
  public static function validate($configuration)
  {
    print_r($some_configuration); // array('some' => 'configuration')
  }
}

Attachments

sf-1596-behavior-config-validation.patch (1.2 kB) - added by trivoallan on 03/20/07 16:56:26.

Change History

03/20/07 16:56:12 changed by trivoallan

  • summary changed from sfPropelBehavior configuration validation to [PATCH] sfPropelBehavior configuration validation.

here's a patch. inline documentation should be enough to understand how it works. i did not patch the book because chapter about behavior is really too short to integrate this.

03/20/07 16:56:26 changed by trivoallan

  • attachment sf-1596-behavior-config-validation.patch added.

06/23/08 06:23:59 changed by dwhittle

  • qualification set to Design decision.
  • milestone set to 1.1.0.

Can you submit an updated patch?

06/29/08 22:54:51 changed by FabianLange

  • owner changed from fabien to trivoallan.
  • milestone changed from 1.1.0 to 1.2.0.

please make a patch so that this can go into 1.2

11/09/08 21:35:07 changed by fabien

  • milestone changed from 1.2.0 to 1.3.0.