initLogTable

@param string $name

@return  void
350570
public function initLogTable($name = null)
    {
        $name = $name ?: $this->logTable;

        $table = $this->db->getTable($name);

        if ($table->exists()) {
            return;
        }

        $table->create(function (Schema $schema) {
            $schema->varchar('version');

            // Use exists time as timestamp before framework supports CURRENT_TIMESTAMP
            $schema->timestamp('start_time')->defaultValue('1970-01-02 00:00:01');
            $schema->timestamp('end_time')->defaultValue('1970-01-02 00:00:01');
        });
    }
1178524
public static function init()
    {
        if(static::$isInited)
        {
            throw new \RuntimeException('MemoryTableManager can not repeated init');
        }
        foreach(static::$tables as $name => $option)
        {
            $table = new \Swoole\Table($option['size'] ?? 1024, $option['conflictProportion'] ?? 0.2);
            foreach($option['columns'] as $column)
            {
                $table->column($column['name'], $column['type'] ?? swoole_table::TYPE_STRING, $column['size'] ?? 0);
            }
            if(!$table->create())
            {
                throw new \RuntimeException('MemoryTableManager create table failed');
            }
            static::$tables[$name] = $table;
        }
        static::$isInited = true;
    }
1018628
public function useSyslog($name = 'laravel', $level = 'debug')
    {
        $this->monolog->pushHandler(new SyslogHandler($name, LOG_USER, $level));
    }
653419
public function init()
	{
		parent::init();
		if($this->name===null)
			$this->sortable=false;
		if($this->name===null && $this->value===null)
			throw new CException(Yii::t('zii','Either "name" or "value" must be specified for CDataColumn.'));
	}
1210831
protected function setTagItem(string $name): void
    {
        if (!empty($this->tag)) {
            foreach ($this->tag as $tag) {
                $tagName = $this->getTagKey($tag);
                if ($this->handler->has($tagName)) {
                    $this->handler->append($tagName, ',' . $name);
                } else {
                    $this->handler->set($tagName, $name);
                }
            }

            $this->tag = null;
        }
    }
1094898
public function initialize(Table $table)
    {
        $this->table = $table;
        $this->table->setTableId($this->tableId);
    }
1046257
public static function init($path, $name = 'log', $minimumLevel = self::DEBUG)
    {
        if($path === 'php://output')
        {
            self::$active = true;
        }
        else if(is_writable($path))
        {
            self::$active = true;
        }
        else 
        {
            self::$active = false;
        }
        
        self::$backend = null;
        self::$stream = null;
        self::$name = $name;
        self::$logFilePath = $path;
        self::$minimumLevel = $minimumLevel;
    }
255386
public function init()
	{
		parent::init();
		if($this->getLogPath()===null)
			$this->setLogPath(Yii::app()->getRuntimePath());
	}
1051971
private static function init() {
        if (self::$logDebug === null) {
            $loglevel        = Logger::getLogLevel(__CLASS__);
            self::$logDebug  = ($loglevel <= L_DEBUG );
            self::$logInfo   = ($loglevel <= L_INFO  );
            self::$logNotice = ($loglevel <= L_NOTICE);
        }
    }
864648
public function initSubject($name)
    {
        $this->fetchSubjectsFromRegistry($name);

        try {

            if (empty($this->subjects[$name])) {
                $this->subjects[$name] = new EventSubject($name);

                if ($this->registry->isRegistered($name)) {

                    // modify registration
                    $this->registry->replace($name, $this->subjects[$name]);

                } else {

                    $this->registry->register($name, $this->subjects[$name]);
                }
            }

        } catch (RegistryException $re) {
            $this->getDrupalConnectorFactory()
                ->getCommonConnector()
                ->watchdog(
                'Liip Drupal Event Manager',
                $re->getMessage(),
                array(),
                WATCHDOG_ERROR
            );
        }
    }
1293240
public function init($tableName = null, $forceAllFields = false)
    {
        if ($tableName) {
            $this->_sCoreTable = $tableName;
        }

        // reset view table
        $this->_sViewTable = false;

        if (count($this->_aFieldNames) <= 1) {
            $this->_initDataStructure($forceAllFields);
        }
    }
519529
public static function debugSession($name = "") {

        $session_id = request()->session()->sessionId();
        $sessionIds = Cache::get(md5('Log.debugSession'), []);
        $sessionIds[ $session_id ] = $name;
        Cache::set(md5('Log.debugSession'), $sessionIds);
    }
664549
public function removeEvent(string $name, ?string $table = null): void
    {
        $this->connection->getEventHandler()->removeEvent($name, $table);
    }
1003790
private function bakeEntity(string $name) : void
    {
        $this->pathFragment = 'Model/Entity/';

        $this->bake($this->_entityName($name), 'Model/entity', ['name' => $this->_entityName($name)]);
    }
339988
public function remove($name): void
    {
        if ($this->contains($name) == false) {
            return;
        }

        unset($this->record[$name]);
    }
8520
public function main(string $name = '') : void
    {
        parent::main();

        $name = $this->_camelize($name);

        $this->validate($name, (string)Configure::read('CsvMigrations.modules.path'));

        $this->bakeModuleConfig($name);
        $this->bakeDatabaseConfig($name);
        $this->bakeViewsConfig($name);
        $this->bakeController($name);
        $this->bakeApiController($name);
        $this->bakeTable($name);
        $this->bakeEntity($name);
        $this->bakeFeature($name);
    }
1350363
public function mark($name, $logFirst = false) {
        if (isset($this->_marks[$name])) {
            $this->_marks[$name]['time'] = round((microtime(true)-$_SERVER['REQUEST_TIME'])*1000-$this->_marks[$name]['time']).'ms';
            if (function_exists('memory_get_usage')) {
                $this->_marks[$name]['memory'] = round((memory_get_usage()-$this->_marks[$name]['memory'])/1024) . 'K';
            } else {
                $this->_marks[$name]['memory'] = 'N/A';
            }
            $this->_logger->zflog(
                array('time' => $this->_marks[$name]['time'],
                      'memory' => $this->_marks[$name]['memory'],
                      'message' => $name
                )
            );
        } else {
            $this->_marks[$name]['time'] = (microtime(true)-$_SERVER['REQUEST_TIME'])*1000;
            if (function_exists('memory_get_usage')) {
                $this->_marks[$name]['memory'] = memory_get_usage();
            } else {
                $this->_marks[$name]['memory'] = 'N/A';
            }
            if ($logFirst) {
                $this->_logger->zflog(
                    array('time' => round($this->_marks[$name]['time']).'ms',
                          'memory' => round($this->_marks[$name]['memory']/1024).'K',
                          'message' => $name
                    )
                );
            }
        }
    }