PHP Classes
elePHPant
Icontem

File: functions.php

Recommend this page to a friend!
  Classes of Wolfy-J  >  spiral  >  functions.php  >  Download  
File: functions.php
Role: Example script
Content type: text/plain
Description: Example script
Class: spiral
Modular Web application development framework
Author: By
Last change: migrate commands are back!
Date: 18 days ago
Size: 571 bytes
 

Contents

Class file image Download
<?php
/**
 * Spiral Framework.
 *
 * @license MIT
 * @author Anton Titov (Wolfy-J)
 */
declare(strict_types=1);

if (!
function_exists('bind')) {
   
/**
     * Shortcut to container Autowire definition.
     *
     * Example:
     * 'name' => bind(SomeClass::name, [...])
     *
     * @param string $alias Class name or alias.
     * @param array $parameters
     *
     * @return \Spiral\Core\Container\Autowire
     */
   
function bind(string $alias, array $parameters = [])
    {
        return new \
Spiral\Core\Container\Autowire($alias, $parameters);
    }
}