Cake\ORM\Association\BelongsToMany::_junctionTableName PHP 메소드

_junctionTableName() 보호된 메소드

If no arguments are passed the current configured name is returned. A default name based of the associated tables will be generated if none found.
protected _junctionTableName ( string | null $name = null ) : string
$name string | null The name of the junction table.
리턴 string
    protected function _junctionTableName($name = null)
    {
        if ($name === null) {
            if (empty($this->_junctionTableName)) {
                $tablesNames = array_map('\\Cake\\Utility\\Inflector::underscore', [$this->source()->table(), $this->target()->table()]);
                sort($tablesNames);
                $this->_junctionTableName = implode('_', $tablesNames);
            }
            return $this->_junctionTableName;
        }
        return $this->_junctionTableName = $name;
    }