izzum\statemachine\Identifier::getId PHP Метод

getId() публичный Метод

get the unique identifier representation for an Identifier, which consists of the machine name and the entity_id in parseable form.
public getId ( boolean $readable = false ) : string
$readable boolean human readable or not. defaults to false
Результат string
    public function getId($readable = false)
    {
        if ($readable) {
            $output = "machine: '" . $this->getMachine() . "', id: '" . $this->getEntityId() . "'";
        } else {
            $output = $this->getMachine() . "_" . $this->getEntityId();
        }
        return $output;
    }

Usage Example

Пример #1
0
 public function isPersisted(Identifier $identifier)
 {
     $key = $identifier->getId();
     if (!isset($_SESSION[$this->namespace][$key])) {
         return false;
     }
     return true;
 }
All Usage Examples Of izzum\statemachine\Identifier::getId