Guest User

Untitled

a guest
Jun 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Get node defined by $where
  5. *
  6. * @param string|array|Zend_Db_Table_Select|Zend_Db_Table_Row $where OPTIONAL
  7. * An SQL WHERE clause or Zend_Db_Table_Select object. Or Row object.
  8. * @return Zend_Db_Table_Row_Abstract
  9. */
  10. protected function _getNode($where)
  11. {
  12. if (!($where instanceof Zend_Db_Table_Row_Abstract)) {
  13. if (is_int($where)) {
  14. $where = "{$this->_relativeKeyColumn} = $where";
  15. }
  16.  
  17. $node = $this->fetchRow($where);
  18. if ($node === null) {
  19. return null;
  20. }
  21. } else {
  22. $node = $where;
  23. }
  24.  
  25. return $node;
  26. }
Add Comment
Please, Sign In to add comment