이 여기에 코드입니다 : 메소드 삽입에서정말 간단한 PHP 코드를 이해하는 데 어려움을 겪고 있습니다. 도와주세요?
<?php
class Order extends Zend_Db_Table_Abstract
{
protected $_name = 'orders';
protected $_limit = 200;
protected $_authorised = false;
public function setLimit($limit)
{
$this->_limit = $limit;
}
public function setAuthorised($auth)
{
$this->_authorised = (bool) $auth;
}
public function insert(array $data)
{
if ($data['amount'] > $this->_limit
&& $this->_authorised === false) {
throw new Exception('Unauthorised transaction of greater than '
. $this->_limit . ' units');
}
return parent::insert($data);
}
}
(), parent::insert($data)
은 무엇입니까? 그것은 스스로를 부르는 것입니까? 왜 그렇게했을까요? IF 조건에 관계없이 return 문이 실행되는 이유는 무엇입니까?
정말 고맙습니다. :) –