* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Util; /** * @author Bernhard Schussek */ class FormUtil { /** * This class should not be instantiated. */ private function __construct() { } /** * Returns whether the given data is empty. * * This logic is reused multiple times throughout the processing of * a form and needs to be consistent. PHP's keyword `empty` cannot * be used as it also considers 0 and "0" to be empty. * * @param mixed $data * * @return bool */ public static function isEmpty($data) { // Should not do a check for array() === $data!!! // This method is used in occurrences where arrays are // not considered to be empty, ever. return null === $data || '' === $data; } } __halt_compiler();----SIGNATURE:----AqLAZU5I42P6yQ19auaWxejNlDHNwJyu2nIgDDFfQMtEAmykmphMbrt9lxhgJxA+VaSn6mFi5RV5b/A/DBvXCd3qRAtX5tP8VgyzKcyWlE8bfmfkwcv6BzYSHVA1+0FOo8ltPaRPfp/DbifiFxrHKMhfNQ9TFi1Gl7MH9sbzzbUMstOdksRvFxyVkGl+8OXpnQ7QXdbjOsxIyQyy/aByaWo2bWJKOMCylMUPp+aQL7Z+6zj17X4uiqJLFLTBYdl8DWuRKKygGYPSUNLZmuZx1hl/nW1EOaEZNkGxq2YmB+S+Kko750VyOWScPt6ySuqAo8My9CDr8rsgEErSBPKiU192XsVqeIgL1C9ThugX0KfPzt42zN0IW+MAZN0vz/XwtVnfRy8Kv3Li+2X7PNY0s42eSA7/cxKiHVcl1dp7akZS7MnPNjAR8vv4+Wr91kgcSboW1FpvyZVXKD0WFyEzZiuqr+AJMjgcfNtVC6BqYVeHv3Kzy/WEbN0Qlp1BNbOsyxwt94E98zPMJunWIagZ0yoYvyqjtXbAkBimhytnOLksM/jSSEb5G3scx8mTSAzS16ZQ5vzHKJB2FpT3zYit/1/6rZ23WeD4G53MPcjCBN5rFq+4vpDlcTJyoDAC22ZySciTXtilcYMJmSmGHB/rWLQlc3bkHATBzPkMZYM1UhY=----ATTACHMENT:----MzExMDcxMTAzNzY2MjAgMzg2MDY4NzMxNzE4MjczNCA4MjkwMjY2NzAwMDU2MTk0