public function hasProperty($key) { $properties = $this->getProperties(); foreach ($properties as $property) { if ($property['key'] === $key && $property['value'] !== '') { return true; } } return false; }