Changeset 3562

Show
Ignore:
Timestamp:
01/22/08 16:59:22 (18 months ago)
Author:
jwage
Message:

Added contains() method for checking whether an arbitrary piece of dql exists.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.9/lib/Doctrine/Query.php

    r3503 r3562  
    402402 
    403403    /** 
     404     * contains 
     405     * 
     406     * Method to check if a arbitrary piece of dql exists 
     407     * 
     408     * @param string $dql Arbitrary piece of dql to check for 
     409     * @return boolean 
     410     */ 
     411    public function contains($dql) 
     412    { 
     413      return stripos($this->getDql(), $dql) === false ? false : true; 
     414    } 
     415 
     416    /** 
    404417     * getDql 
    405418     * returns the DQL query associated with this object