Projet

Général

Profil

Révision fbb66ca6

Ajouté par Assos Assos il y a presque 5 ans

Udpate to 7.67

Voir les différences:

drupal7/misc/typo3/phar-stream-wrapper/src/PharStreamWrapper.php
11 11
 * The TYPO3 project - inspiring people to share!
12 12
 */
13 13

  
14
use TYPO3\PharStreamWrapper\Resolver\PharInvocation;
15

  
14 16
class PharStreamWrapper
15 17
{
16 18
    /**
......
29 31
     */
30 32
    protected $internalResource;
31 33

  
34
    /**
35
     * @var PharInvocation
36
     */
37
    protected $invocation;
38

  
32 39
    /**
33 40
     * @return bool
34 41
     */
......
409 416
     */
410 417
    protected function assert($path, $command)
411 418
    {
412
        if ($this->resolveAssertable()->assert($path, $command) === true) {
419
        if (Manager::instance()->assert($path, $command) === true) {
420
            $this->collectInvocation($path);
413 421
            return;
414 422
        }
415 423

  
......
424 432
    }
425 433

  
426 434
    /**
427
     * @return Assertable
435
     * @param string $path
436
     */
437
    protected function collectInvocation($path)
438
    {
439
        if (isset($this->invocation)) {
440
            return;
441
        }
442

  
443
        $manager = Manager::instance();
444
        $this->invocation = $manager->resolve($path);
445
        if ($this->invocation === null) {
446
            throw new Exception(
447
                'Expected invocation could not be resolved',
448
                1556389591
449
            );
450
        }
451
        // confirm, previous interceptor(s) validated invocation
452
        $this->invocation->confirm();
453
        $collection = $manager->getCollection();
454
        if (!$collection->has($this->invocation)) {
455
            $collection->collect($this->invocation);
456
        }
457
    }
458

  
459
    /**
460
     * @return Manager|Assertable
461
     * @deprecated Use Manager::instance() directly
428 462
     */
429 463
    protected function resolveAssertable()
430 464
    {

Formats disponibles : Unified diff