LazyRecord\BaseModel::lockRead PHP Метод

lockRead() публичный Метод

public lockRead ( $alias = null )
    public function lockRead($alias = null)
    {
        if (!$alias) {
            $alias = $this->alias;
        }
        // the ::table consts is in the child class.
        if ($alias) {
            $sql = 'LOCK TABLES ' . $this->table . ' AS ' . $alias . ' READ';
        } else {
            $sql = 'LOCK TABLES ' . $this->table . ' READ';
        }
        $this->getReadConnection()->query($sql);
    }