allow_null) { return false; } if (trim((string) $attributes[$attribute]) === '' and ! $this->allow_empty) { return false; } return true; } /** * Allow an empty string to be considered present. * * @return Presence_Of */ public function allow_empty() { $this->allow_empty = true; return $this; } /** * Allow a null to be considered present. * * @return Presence_Of */ public function allow_null() { $this->allow_null = true; return $this; } }