Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Sep 10, 2012
2 parents e02f8ef + 7030f97 commit 4e425f4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ValidatorChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,18 @@ public function __invoke($value)
{
return $this->isValid($value);
}

/**
* Prepare validator chain for serialization
*
* ValidatorPluginManager cannot be serialized, as it contains Traits. For
* this reason property 'plugins' is excluded and thus serialized
* filter chain is not necessarily equal to current chain.
*
* @return array
*/
public function __sleep()
{
return array('validators', 'messages');
}
}

0 comments on commit 4e425f4

Please sign in to comment.