statement = $statement; $this->type = $type; $this->tableName = $tableName; $this->resource = $resource; $this->name = $name; } /** * Get statement. * * @return string */ public function getStatement(): string { return $this->statement; } /** * Add trigger to current statement. * This means, that statement is final and can`t be modified any more. * * @param callable $trigger */ public function addTrigger(callable $trigger) { $this->triggers[] = $trigger; } /** * Get statement type. * * @return string */ public function getType(): string { return $this->type; } /** * Get table name. * * @return string */ public function getTableName(): string { return $this->tableName; } /** * Get resource name. * * @return string */ public function getResource(): string { return $this->resource; } /** * Get triggers array. * * @return callable[] */ public function getTriggers(): array { return $this->triggers; } /** * Get statement name. * * @return string */ public function getName(): string { return $this->name; } }