We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example table:
CREATE TABLE `usersTest` ( `uid` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL, PRIMARY KEY (`uid`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
Example model:
<?php class Userstest extends \Phalcon\Mvc\Model { /** * @var integer */ protected $uid; /** * @var string */ protected $email; /** * Method to set the value of field uid * * @param integer $uid */ public function setUid($uid) { $this->uid = $uid; return $this; } /** * Method to set the value of field email * * @param string $email */ public function setEmail($email) { $this->email = $email; return $this; } /** * Returns the value of field uid * * @return integer */ public function getUid() { return $this->uid; } /** * Returns the value of field email * * @return string */ public function getEmail() { return $this->email; } /** * Validations and business logic */ public function validation() { $this->validate( new Email( array( "field" => "email", "required" => true, ) ) ); if ($this->validationHasFailed() == true) { return false; } } /** * Initialize method for model. */ public function initialize() { $this->setSource('usersTest'); } }
Examples of failing usage in scaffolding:
$this->view->uid = $usersTest->uid; Tag::setDefault("uid", $usersTest->uid); Tag::setDefault("email", $usersTest->email);
$usersTest = new Userstest(); $usersTest->uid = $this->request->getPost("uid"); $usersTest->email = $this->request->getPost("email", "email");
Etc, you get the idea.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Example table:
Example model:
Examples of failing usage in scaffolding:
Etc, you get the idea.
The text was updated successfully, but these errors were encountered: