izzum\statemachine\persistence\Session::getEntityIds PHP Метод

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

{@inheritDoc}
public getEntityIds ( $machine, $state = null )
    public function getEntityIds($machine, $state = null)
    {
        $ids = array();
        foreach ($_SESSION[$this->namespace] as $key => $storage) {
            if (strstr($key, $machine)) {
                if ($state) {
                    if ($storage->state === $state) {
                        $ids[] = $storage->id;
                    }
                } else {
                    $ids[] = $storage->id;
                }
            }
        }
        return $ids;
    }