protected function afterFind() { parent::afterFind(); $matches = array(); if (preg_match('#^([a-zA-Z]{2,})\\:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]+|localhost)\\:([0-9]{1,5})$#i', $this->source, $matches)) { $this->address = $matches[2]; $this->port = $matches[3]; } }
protected function afterFind() { parent::afterFind(); $this->port = $this->source; }