name: Once class_comment: null dependencies: - name: WeakMap type: class source: WeakMap properties: [] methods: - name: __construct visibility: protected parameters: - name: values comment: "# * The current globally used instance.\n# *\n# * @var static|null\n#\ \ */\n# protected static ?self $instance = null;\n# \n# /**\n# * Indicates if\ \ the once instance is enabled.\n# *\n# * @var bool\n# */\n# protected static\ \ bool $enabled = true;\n# \n# /**\n# * Create a new once instance.\n# *\n# *\ \ @param \\WeakMap> $values\n# * @return void" - name: instance visibility: public parameters: [] comment: '# * Create a new once instance. # * # * @return static' - name: value visibility: public parameters: - name: onceable comment: '# * Get the value of the given onceable. # * # * @param Onceable $onceable # * @return mixed' - name: enable visibility: public parameters: [] comment: '# * Re-enable the once instance if it was disabled. # * # * @return void' - name: disable visibility: public parameters: [] comment: '# * Disable the once instance. # * # * @return void' - name: flush visibility: public parameters: [] comment: '# * Flush the once instance. # * # * @return void' traits: - WeakMap interfaces: []