Skip to content
Snippets Groups Projects
Select Git revision
  • ab1f2ddf0b789fc681eaf1c71204c1d0750e9138
  • master default protected
  • ll-workflow
  • b24
  • alc-scindage-donnees-pj
  • FJ_LL_Tbl_Contrat
  • alc-docker-node
  • ll-apiplatform
  • php84
  • ll-rgpd
  • b23
  • alc-filtre-type-intervenant
  • ll-sans-mdb5
  • formules-ancienne-infra
  • ll-formules
  • alc-intervenant-dmep
  • ll-suppr-v_vol-s
  • b20
  • ll-postgresql
  • b23.0.1
  • b22
  • 24.8
  • 24.7
  • 24.6
  • 24.5
  • 24.4
  • 24.3
  • 24.2
  • 24.1
  • 24.0
  • 23.15
  • 24.0-beta19
  • 24.0-beta18
  • 24.0-beta17
  • 24.0-beta16
  • 24.0-beta15
  • 24.0-beta14
  • 24.0-beta13
  • 23.14
  • 24.0-beta12
  • 24.0-beta11
41 results

ContratController.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    AbstractAdapter.php 1.53 KiB
    <?php
    
    namespace ZfcUser\Authentication\Adapter;
    
    use Laminas\Authentication\Storage;
    
    abstract class AbstractAdapter implements ChainableAdapter
    {
        /**
         * @var Storage\StorageInterface
         */
        protected $storage;
    
        /**
         * Returns the persistent storage handler
         *
         * Session storage is used by default unless a different storage adapter has been set.
         *
         * @return Storage\StorageInterface
         */
        public function getStorage()
        {
            if (null === $this->storage) {
                $this->setStorage(new Storage\Session(get_class($this)));
            }
    
            return $this->storage;
        }
    
        /**
         * Sets the persistent storage handler
         *
         * @param  Storage\StorageInterface $storage
         * @return AbstractAdapter Provides a fluent interface
         */
        public function setStorage(Storage\StorageInterface $storage)
        {
            $this->storage = $storage;
            return $this;
        }
    
        /**
         * Check if this adapter is satisfied or not
         *
         * @return bool
         */
        public function isSatisfied()
        {
            $storage = $this->getStorage()->read();
            return (isset($storage['is_satisfied']) && true === $storage['is_satisfied']);
        }
    
        /**
         * Set if this adapter is satisfied or not
         *
         * @param bool $bool
         * @return AbstractAdapter
         */
        public function setSatisfied($bool = true)
        {
            $storage = $this->getStorage()->read() ?: array();
            $storage['is_satisfied'] = $bool;
            $this->getStorage()->write($storage);
            return $this;
        }
    }