Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Doctrine\DBAL\Schema;
4
 
5
/**
6
 * An abstraction class for an asset identifier.
7
 *
8
 * Wraps identifier names like column names in indexes / foreign keys
9
 * in an abstract class for proper quotation capabilities.
10
 */
11
class Identifier extends AbstractAsset
12
{
13
    /**
14
     * @param string $identifier Identifier name to wrap.
15
     * @param bool   $quote      Whether to force quoting the given identifier.
16
     */
17
    public function __construct($identifier, $quote = false)
18
    {
19
        $this->_setName($identifier);
20
 
21
        if (! $quote || $this->_quoted) {
22
            return;
23
        }
24
 
25
        $this->_setName('"' . $this->getName() . '"');
26
    }
27
}