/** * Constructor. * @param Term $term Instancia con los datos sin modificar. * @param string $termName Nombre de la etiqueta. * @param string $termDescription Descripción de la etiqueta. */ public function __construct($term, $termName, $termDescription) { parent::__construct(Term::getTableName()); $this->term = $term; $this->termName = $termName; $this->termDescription = $termDescription; }
/** * Constructor. * @param string $commentAutor Nombre del autor. * @param string $commentAuthorEmail Email del autor. * @param int $commentStatus Estado del comentario. 0 = Sin aprobar, 1 = Aprobado * @param string $commentContents Contenido del comentario. * @param int $postID Identificador de la entrada/post. * @param int $commentUserID Identificador del autor. */ public function __construct($commentAutor, $commentAuthorEmail, $commentStatus, $commentContents, $postID, $commentUserID) { parent::__construct(Term::getTableName(), self::$COLUMNS, self::$VALUES); $this->commentAutor = $commentAutor; $this->commentAuthorEmail = $commentAuthorEmail; $this->commentStatus = $commentStatus; $this->commentContents = $commentContents; $this->postID = $postID; $this->commentUserID = $commentUserID; }
/** * Metodo que obtiene todas las etiquetas de la base de datos. * @return Terms */ public static function selectAll() { $select = self::select(Term::getTableName()); return self::getInstanceData($select); }
/** * Constructor. * @param int $id Identificador. */ public function __construct($id) { parent::__construct($id, Term::getTableName()); }
public function __construct($termName, $termDescription) { parent::__construct(Term::getTableName(), self::$COLUMNS, self::$VALUES); $this->termName = $termName; $this->termDescription = $termDescription; }