isExist() public static méthode

Checks whether the event with the specified name exists
public static isExist ( string $name, integer $accountId, integer $envId ) : boolean
$name string The name of the Event
$accountId integer Identifier of the account
$envId integer Identifier of the environment
Résultat boolean Returns true if the Event exists or false otherwise
 public function FireCustomEvent($ServerID, $EventName, array $Params = array())
 {
     $this->restrictAccess(Acl::RESOURCE_GENERAL_CUSTOM_EVENTS);
     $dbServer = DBServer::LoadByID($ServerID);
     if ($dbServer->envId != $this->Environment->id) {
         throw new Exception(sprintf("Server ID #%s not found", $ServerID));
     }
     if (\Scalr\Model\Entity\EventDefinition::isExist($EventName, $this->user->getAccountId(), $this->Environment->id)) {
         $event = new CustomEvent($dbServer, $EventName, (array) $Params);
     } else {
         throw new Exception(sprintf("Event %s is not defined", $EventName));
     }
     Scalr::FireEvent($dbServer->farmId, $event);
     $response = $this->CreateInitialResponse();
     $response->EventID = $event->GetEventID();
     return $response;
 }